Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[paulktham] iP #104

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c1037da
Level-0-a
paulktham Aug 21, 2024
3b4fe69
Level-0-b
paulktham Aug 21, 2024
22faae3
Level-1
paulktham Aug 26, 2024
db2344b
level 2
paulktham Aug 28, 2024
d5eb788
Level 3.1
paulktham Aug 28, 2024
c8cc746
Level-4
paulktham Sep 5, 2024
05e4753
exception handling
paulktham Sep 9, 2024
3d8be80
package control
paulktham Sep 11, 2024
88f05d4
delete function and arraylist
paulktham Sep 16, 2024
c53d15f
save function
paulktham Sep 16, 2024
2509408
fix bugs from level 6
paulktham Sep 16, 2024
0bf1026
Merge branch 'branch-level-7' and fix bugs
paulktham Sep 16, 2024
a7bf5e1
A-MoreOOP
paulktham Sep 27, 2024
2591f71
A-MoreOOP-V2
paulktham Sep 28, 2024
6fb3fad
Merge branch 'master' of https://github.com/paulktham/ip
paulktham Sep 28, 2024
e6e6416
DateTime and priority list implemented
paulktham Sep 28, 2024
0747566
find function
paulktham Sep 28, 2024
030791b
Merge pull request #1 from paulktham/branch-level-8
paulktham Sep 28, 2024
a6bc5b2
Merge branch 'master' into branch-level-9
paulktham Sep 28, 2024
75bd81b
Merge pull request #2 from paulktham/branch-level-9
paulktham Sep 28, 2024
76026f0
JavaDoc comments with some refactoring
paulktham Sep 28, 2024
fa210bc
A-UserGuide
paulktham Sep 30, 2024
67fe400
Update Task.java
paulktham Oct 3, 2024
cfecd69
JavaDoc Improvements
paulktham Oct 3, 2024
c64b6b5
Merge branch 'master' into branch-A-JavaDoc
paulktham Oct 3, 2024
277e82f
Merge pull request #3 from paulktham/branch-A-JavaDoc
paulktham Oct 3, 2024
412bec2
Indentations and minor comment fixes
paulktham Oct 3, 2024
18805a3
checkstyle
paulktham Oct 11, 2024
fd61f48
small error message change.
paulktham Oct 11, 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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

*.class

src/main/java/data/Tasks.txt

ip.jar
287 changes: 287 additions & 0 deletions config/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/supressions.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