Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ab3b287
Commit change in Bot Name
Bev-low Aug 19, 2024
85bd6a5
Commit change Logo
Bev-low Aug 19, 2024
afcf4e7
Commit change text
Bev-low Aug 19, 2024
5c3cc13
Commit Final Version
Bev-low Aug 19, 2024
9e97cef
Commit Final Version
Bev-low Aug 19, 2024
eb4b65e
added an echo function
Bev-low Aug 29, 2024
9fbf0c6
Commit Echo Function and Gitignore Class
Bev-low Aug 29, 2024
89920cc
Commit update Echo
Bev-low Aug 29, 2024
b31dc7b
Commit update Echo
Bev-low Aug 29, 2024
dced9db
Added A tasklist maker
Bev-low Aug 29, 2024
7014334
Mark as Done Algo added. Created a Task Class and the List class is m…
Bev-low Aug 29, 2024
2076ea4
Mark as Done Algo added. Created a Task Class and the List class is m…
Bev-low Aug 29, 2024
258892c
Add coding standards
Bev-low Aug 30, 2024
50d89a6
Add coding standards
Bev-low Aug 30, 2024
f67a83f
Add Level-4
Bev-low Sep 4, 2024
1e1bb0c
Add Level-4-bugfixes
Bev-low Sep 4, 2024
0085d8f
Add Level-4-bugfixes
Bev-low Sep 4, 2024
01ea11f
Add A-TextIuTesting
Bev-low Sep 5, 2024
9893111
Add A-CodeQuality
Bev-low Sep 5, 2024
0573acf
Add A-CodeQuality
Bev-low Sep 5, 2024
2361592
Add Level-5
Bev-low Sep 10, 2024
f5fcf14
Add Level-5-MasterBranch
Bev-low Sep 10, 2024
1996a83
Add Level-5-MasterBranch
Bev-low Sep 10, 2024
166d83b
Add Level-5-MasterBranch
Bev-low Sep 10, 2024
9f1bc2c
Add Level-5-MasterBranch
Bev-low Sep 10, 2024
0e6bae6
Merge branch 'master' into branch-level-5
Bev-low Sep 10, 2024
56d0e22
Add A-Packages
Bev-low Sep 12, 2024
3b75765
Add Level-5-bug fixes
Bev-low Sep 18, 2024
b63bd20
Add Level-6+A-Collections
Bev-low Sep 20, 2024
79a8871
Add Level-6+A-Collections
Bev-low Sep 20, 2024
3d1361d
Add Level-7
Bev-low Sep 22, 2024
1527ab8
Merge branch 'branch-level-6'
Bev-low Sep 22, 2024
d8923aa
Add Level-7-conflicts
Bev-low Sep 22, 2024
91f00e2
Add Level-7-bug-fixes
Bev-low Sep 22, 2024
e7f6588
Add A-collections
Bev-low Sep 22, 2024
2a63fdc
Add A-Exceptions
Bev-low Sep 22, 2024
6c8dfc5
Add A-Exceptions
Bev-low Sep 22, 2024
3be8c65
Add A-MoreOOP
Bev-low Sep 26, 2024
adabff1
Add Level-8
Bev-low Oct 1, 2024
7ce6169
Add Level-9
Bev-low Oct 1, 2024
562d87d
Add A-JavaDoc
Bev-low Oct 1, 2024
1289341
Merge pull request #1 from Bev-low/branch-level-8
Bev-low Oct 1, 2024
cdf3bfb
Merge branch 'master' into branch-level-9
Bev-low Oct 1, 2024
3a40699
Merge pull request #2 from Bev-low/branch-level-9
Bev-low Oct 1, 2024
74dd30e
Merge branch 'master' into A-JavaDoc
Bev-low Oct 1, 2024
5de4602
Merge pull request #3 from Bev-low/A-JavaDoc
Bev-low Oct 1, 2024
9d6381c
Add A-JavaDoc-fixes
Bev-low Oct 2, 2024
769a80b
Add A-UserGuide
Bev-low Oct 4, 2024
86639ed
Resolved outstanding merge conflicts, keeping master version
Bev-low Oct 5, 2024
95f37b6
Add A-UserGuide-fixes
Bev-low Oct 5, 2024
c383183
Merge branch-level-6 into master, keeping master version
Bev-low Oct 5, 2024
e2cc91e
Add A-Jar2.0
Bev-low Oct 9, 2024
8dc1a20
Add A-Formatting-Fixes
Bev-low Oct 9, 2024
2fa2497
Add A-added Gradle Checks
Bev-low Oct 9, 2024
b32e1fe
Add Bug-Fixes
Bev-low Oct 9, 2024
4b1bc2e
Add Bug-Fixes
Bev-low Oct 9, 2024
c9478f8
Add Fix User-Guide
Bev-low Oct 9, 2024
0f6e5f1
Add Fix user-guide
Bev-low Oct 9, 2024
56dd508
Add Fix user-guide
Bev-low Oct 9, 2024
2b98a0b
Add Updating ReadMe.md
Bev-low Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ src/main/resources/docs/
*.iml
bin/

# Ignore compiled .class files
*.class

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: chattycharlie.ChattyCharlie

16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duke project template
# Chatty Charlie

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.
This is a command line terminal task tracker application. Given below are instructions on how to use it.

## Setting up in Intellij

Expand All @@ -13,12 +13,6 @@ Prerequisites: JDK 17, update Intellij to the most recent version.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 17** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
3. After that, locate the `src/main/java/chattycharlie/ChattyCharlie.java` file, right-click it, and choose `Run ChattyCharlie.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:

![Starting Image](./docs/images/intro.png)
25 changes: 25 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
plugins {
id 'java'
id 'application'
id 'checkstyle' // Checkstyle plugin added
}

group 'com.example'
version '1.0-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0'
}

application {
mainClass = 'chattycharlie.ChattyCharlie' // Updated to reflect your main class
}

checkstyle {
toolVersion = '10.2' // Specifying Checkstyle version 10.2
config = resources.text.fromFile('config/checkstyle/checkstyle.xml')
}
287 changes: 287 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,287 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
This configuration file enforces rules for the coding standard at
https://se-education.org/guides/conventions/java/basic.html
-->

<module name="Checker">

<module name="FileTabCharacter">
<!-- Checks that there are no tab characters in the file. -->
</module>

<module name="NewlineAtEndOfFile">
<!-- Accept LF, CR or CRLF to accomodate devs who prefer different line endings -->
<property name="lineSeparator" value="lf_cr_crlf"/>
</module>

<module name="RegexpSingleline">
<!-- Checks that FIXME is not used in comments. TODO is preferred. -->
<property name="format" value="((//.*)|(\*.*))FIXME" />
<property name="message" value='TODO is preferred to FIXME."' />
</module>

<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>

<module name="LineLength">
<!-- Checks if a line is too long. -->
<property name="max" value="120"/>
</module>

<!-- All Java AST specific tests live under TreeWalker module. -->
<module name="TreeWalker">

<!-- Required to allow exceptions in code style -->
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>

<!--
IMPORT CHECKS
-->

<!-- Checks for redundant import statements.
An import statement is redundant if:
* It is a duplicate of another import. This is, when a class is imported more than once.
* The class non-statically imported is from the java.lang package, e.g. importing java.lang.String.
* The class non-statically imported is from the same package as the current package.
-->
<module name="RedundantImport"/>

<!-- Checks for unused import statements.
An import statement is unused if:
It's not referenced in the file.
-->
<module name="UnusedImports"/>

<module name="AvoidStarImport"/>

<!--
NAMING CHECKS
-->

<module name="PackageName">
<!-- Validates identifiers for package names against the supplied expression. -->
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]{1,})*$"/>
<property name="severity" value="warning"/>
</module>

<module name="TypeName">
<!-- Validates static, final fields against the expression "^[A-Z][a-zA-Z0-9]*$". -->
<metadata name="altname" value="TypeName"/>
<property name="severity" value="warning"/>
</module>

<module name="ConstantName">
<!-- Validates non-private, static, final fields against the expression "^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$". -->
<metadata name="altname" value="ConstantName"/>
<property name="applyToPrivate" value="false"/>
<message key="name.invalidPattern"
value="Variable ''{0}'' should be in ALL_CAPS (if it is a constant) or be private (otherwise)."/>
<property name="severity" value="warning"/>
</module>

<module name="StaticVariableName">
<!-- Validates static, non-final fields against the supplied expression. -->
<metadata name="altname" value="StaticVariableName"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*_?$"/>
<property name="severity" value="warning"/>
</module>

<module name="MemberName">
<!-- Validates non-static members against the supplied expression. -->
<metadata name="altname" value="MemberName"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
<property name="severity" value="warning"/>
</module>

<module name="MethodName">
<!-- Validates identifiers for method names against the supplied expression. -->
<metadata name="altname" value="MethodName"/>
<property name="format" value="^[a-z][a-zA-Z0-9]*(_[a-z][a-zA-Z0-9]+){0,2}$"/>
</module>

<module name="ParameterName">
<!-- Validates identifiers for method parameters against the expression "^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>

<module name="LocalFinalVariableName">
<!-- Validates identifiers for local final variables against the expression "^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>

<module name="LocalVariableName">
<!-- Validates identifiers for local variables against the expression "^[a-z][a-zA-Z0-9]*$". -->
<property name="severity" value="warning"/>
</module>


<!--
LENGTH and CODING CHECKS
-->

<!-- Checks that array type declarations follow Java Style
Java style: public static void main(String[] args) // Allowed
C style: public static void main(String args[]) // Not allowed
-->
<module name="ArrayTypeStyle"/>

<!-- Checks if a catch block is empty and does not contain any comments. -->
<module name="EmptyCatchBlock"/>

<module name="LeftCurly">
<!-- Checks for placement of the left curly brace ('{'). -->
<property name="severity" value="warning"/>
</module>

<module name="RightCurly">
<!-- Checks right curlies on CATCH, ELSE, and TRY blocks are on
the same line. e.g., the following example is fine:
<pre>
if {
...
} else
</pre>
-->
<!-- This next example is not fine:
<pre>
if {
...
}
else
</pre>
-->
<property name="severity" value="warning"/>
</module>

<!-- Checks for braces around loop blocks -->
<module name="NeedBraces">
<!--
if (true) return 1; // Not allowed

if (true) { return 1; } // Not allowed

else if {
return 1; // else if should always be multi line
}

if (true)
return 1; // Not allowed
-->
<property name="allowEmptyLoopBody" value="true"/>
</module>

<!-- Checks that each variable declaration is in its own statement and on its own line. -->
<module name="MultipleVariableDeclarations"/>

<module name="OneStatementPerLine"/>

<!-- Checks that long constants are defined with an upper ell.-->
<module name="UpperEll" />

<module name="FallThrough">
<!-- Warn about falling through to the next case statement. Similar to
javac -Xlint:fallthrough, but the check is suppressed if a single-line comment
on the last non-blank line preceding the fallen-into case contains 'fall through' (or
some other variants which we don't publicized to promote consistency).
-->
<property name="reliefPattern"
value="fall through|Fall through|fallthru|Fallthru|falls through|Falls through|fallthrough|Fallthrough|No break|NO break|no break|continue on"/>
</module>

<module name="MissingSwitchDefault"/>

<!--
ORDER CHECKS
-->

<!-- Checks that the order of at-clauses follows the tagOrder default property value order.
@author, @version, @param, @return, @throws, @exception, @see, @since, @serial, @serialField, @serialData, @deprecated
-->
<module name="AtclauseOrder"/>

<!-- Checks if the Class and Interface declarations is organized in this order
1. Class (static) variables. Order: public, protected, package level (no access modifier), private.
2. Instance variables. Order: public, protected, package level (no access modifier), private.
3. Constructors
4. Methods
-->
<module name ="DeclarationOrder"/>

<!-- Checks that default is after all cases in a switch statement -->
<module name="DefaultComesLast"/>

<module name="ModifierOrder">
<!-- Warn if modifier order is inconsistent with JLS3 8.1.1, 8.3.1, and
8.4.3. The prescribed order is:
public, protected, private, abstract, static, final, transient, volatile,
synchronized, native, strictfp
-->
</module>

<module name="OverloadMethodsDeclarationOrder"/>

<!--
WHITESPACE CHECKS
-->

<!-- Checks that comments are indented relative to their position in the code -->
<module name="CommentsIndentation"/>

<module name="Indentation">
<property name="caseIndent" value="0" />
<property name="throwsIndent" value="8" />
</module>

<module name="NoWhitespaceBeforeCaseDefaultColon"/>

<!--
JAVADOC CHECKS
-->

<!-- Checks that all block-tags are ordered correctly. -->
<module name="AtclauseOrder"/>

<!-- Checks that Javadoc block tags appear only at the beginning of the line. -->
<module name="JavadocBlockTagLocation"/>

<!-- Checks that all Javadoc comments start from the second line. -->
<module name="JavadocContentLocationCheck" />

<!-- Checks that each line in Javadoc has leading asterisks. -->
<module name="JavadocMissingLeadingAsterisk"/>

<!-- Checks that each non-empty line in Javadoc has whitespace after leading asterisk. -->
<module name="JavadocMissingWhitespaceAfterAsterisk"/>

<!-- Checks that for block tags, indentation of continuation lines is at least 4 spaces. -->
<module name="JavadocTagContinuationIndentation"/>

<!-- Checks the Javadoc's format for every class, enumeration and interface. -->
<module name="JavadocType">
<property name="allowMissingParamTags" value="true"/>
</module>

<!-- Checks the Javadoc's format for every method (excluding getters, setters and constructors). -->
<module name="JavadocMethod">
<property name="allowedAnnotations" value="Override, Test, BeforeAll, BeforeEach, AfterAll, AfterEach, Subscribe"/>
<property name="accessModifiers" value="public"/>
<property name="validateThrows" value="false"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF"/>
</module>

<module name="InvalidJavadocPosition"/>

</module>
</module>
10 changes: 10 additions & 0 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<suppressions>
<suppress checks="JavadocType" files=".*Test\.java"/>
<suppress checks="MissingJavadocMethodCheck" files=".*Test\.java"/>
</suppressions>
Loading