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

[Jason] Duke Increments #368

Open
wants to merge 66 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
65f72a8
Add support for Gradle workflow
j-lum Aug 6, 2019
0112efe
Add sample checkstyle configuration
j-lum Aug 12, 2019
cfd6da7
Change file mode on `gradle` to be executable
j-lum Aug 18, 2019
6e6ace1
Merge pull request #12 from j-lum/gradle+x
j-lum Aug 18, 2019
e4468fd
W2 - Level-1
ReignOfComputer Aug 22, 2019
f1bcc03
W2 - Level-2
ReignOfComputer Aug 22, 2019
ce3c6a2
W2 - Level-3 | A-Classes
ReignOfComputer Aug 22, 2019
a1d0e49
W2 - Level-4 | A-Inheritance
ReignOfComputer Aug 22, 2019
63f391d
W2 - A-TextUiTesting
ReignOfComputer Aug 22, 2019
9b3114a
W2 - Level-5 | A-Exceptions
ReignOfComputer Aug 22, 2019
87d04fc
W2 - Level-6 | A-Collections
ReignOfComputer Aug 22, 2019
1993700
W3 - Level-7
ReignOfComputer Sep 5, 2019
7d25f64
W3 - Level-8
ReignOfComputer Sep 5, 2019
ca79572
Merge branch 'branch-level-7'
ReignOfComputer Sep 5, 2019
b430600
Merge branch 'branch-level-8'
ReignOfComputer Sep 5, 2019
a27d0e0
Cleanup
ReignOfComputer Sep 5, 2019
d12d74d
Checkpoint
ReignOfComputer Sep 5, 2019
d599e58
W3 - A-MoreOOP
ReignOfComputer Sep 8, 2019
ed47830
W3 - A-Packages
ReignOfComputer Sep 8, 2019
4e40f25
W3 - A-JUnit
ReignOfComputer Sep 8, 2019
04709ef
W3 - A-Jar
ReignOfComputer Sep 8, 2019
ebbb385
Merge branch 'gradle'
ReignOfComputer Sep 8, 2019
bbef516
W3 - A-Gradle
ReignOfComputer Sep 8, 2019
afc4cf0
Checkpoint
ReignOfComputer Sep 8, 2019
3a1bf72
W3 - A-JavaDoc
ReignOfComputer Sep 13, 2019
1b04d7b
W3 - A-CodingStandard
ReignOfComputer Sep 13, 2019
e82e1ca
W3 - Level-9
ReignOfComputer Sep 13, 2019
4183818
Merge branch 'branch-A-JavaDoc'
ReignOfComputer Sep 13, 2019
f041f08
Merge branch 'branch-A-CodingStandard'
ReignOfComputer Sep 13, 2019
4fbd727
Merge branch 'branch-Level-9'
ReignOfComputer Sep 13, 2019
68a79df
Fix Parsing for Todo
ReignOfComputer Sep 13, 2019
ee1f0d0
W4 - A-Varargs
ReignOfComputer Sep 13, 2019
f7153d3
Checkpoint
ReignOfComputer Sep 13, 2019
f6d2a85
W4 - Level 10
ReignOfComputer Sep 15, 2019
21d1cf8
Merge branch 'branch-Level-10'
ReignOfComputer Sep 15, 2019
4a100f6
Merge branch 'branch-A-Varargs'
ReignOfComputer Sep 15, 2019
80eddee
Cleanup
ReignOfComputer Sep 15, 2019
85dbd20
W5 - A-CodeQuality
ReignOfComputer Sep 15, 2019
35debc2
Merge pull request #5 from ReignOfComputer/branch-A-CodeQuality
ReignOfComputer Sep 15, 2019
3894fd8
W5 - A-Lambdas
ReignOfComputer Sep 15, 2019
f31afb0
Merge pull request #6 from ReignOfComputer/branch-A-Lambdas
ReignOfComputer Sep 15, 2019
3238c78
W5 - A-Assertations
ReignOfComputer Sep 15, 2019
6d36279
W5 - A-Travis
ReignOfComputer Sep 15, 2019
d4e0b61
Explict Tests for Checkstyle
ReignOfComputer Sep 15, 2019
61fb6c5
Fix Broken Tests
ReignOfComputer Sep 15, 2019
68a6ad2
CI Status in Readme
ReignOfComputer Sep 15, 2019
3d2c4f9
Merge pull request #8 from ReignOfComputer/branch-A-Assertations
ReignOfComputer Sep 15, 2019
e9ffbb8
W5 - A-Streams
ReignOfComputer Sep 15, 2019
00f268a
Merge pull request #9 from ReignOfComputer/branch-A-Streams
ReignOfComputer Sep 15, 2019
17aef6a
Remove Redundant Code
ReignOfComputer Sep 15, 2019
002a959
W5 - C-Help
ReignOfComputer Sep 15, 2019
435b2c3
W5 - C-BetterSearch
ReignOfComputer Sep 15, 2019
b2ccb17
W5 - C-Statistics
ReignOfComputer Sep 15, 2019
ea45dba
HustlePad Personality
ReignOfComputer Sep 19, 2019
55b0669
Fix Missing Spaces
ReignOfComputer Sep 19, 2019
949fec2
Product Screenshot v1
ReignOfComputer Sep 19, 2019
f00b348
W6 - A-UserGuide
ReignOfComputer Sep 19, 2019
b49e8ed
shadowjar fix
ReignOfComputer Sep 19, 2019
5f14292
Set theme jekyll-theme-hacker
ReignOfComputer Sep 19, 2019
d55e710
Set theme jekyll-theme-hacker
ReignOfComputer Sep 19, 2019
82e9fcf
Set theme jekyll-theme-cayman
ReignOfComputer Sep 19, 2019
2e68aa4
JavaDocs V2
ReignOfComputer Sep 19, 2019
a248cd0
UserGuide V2
ReignOfComputer Sep 19, 2019
c8d2b18
UserGuide V3
ReignOfComputer Sep 19, 2019
e8cf2c0
UserGuide V4
ReignOfComputer Sep 19, 2019
bb4a3c4
JaVa WrItE oNcE rUn AnYwHeRe
ReignOfComputer Sep 20, 2019
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 @@ -12,3 +12,6 @@ src/main/resources/docs/
.DS_Store
*.iml
bin/

# Duke data files
duke.txt
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
language: java
40 changes: 2 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
# Setting up
# Not The Repo You're Looking For

**Prerequisites**

* JDK 11
* Recommended: IntelliJ IDE
* Fork this repo to your GitHub account and clone the fork to your computer

**Importing the project into IntelliJ**

1. Open IntelliJ (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first).
1. Set up the correct JDK version.
* Click `Configure` > `Structure for new Projects` (in older versions of Intellij:`Configure` > `Project Defaults` > `Project Structure`).
* If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11.
* Click `OK`.
1. Click `Import Project`.
1. Locate the project directory and click `OK`.
1. Select `Create project from existing sources` and click `Next`.
1. Rename the project if you want. Click `Next`.
1. Ensure that your src folder is checked. Keep clicking `Next`.
1. Click `Finish`.

# Tutorials

Duke Increment | Tutorial
---------------|---------------
`A-Gradle` | [Gradle Tutorial](tutorials/gradleTutorial.md)
`A-TextUiTesting` | [Text UI Testing Tutorial](tutorials/textUiTestingTutorial.md)
`Level-10` | JavaFX tutorials:<br>→ [Part 1: Introduction to JavaFX][fx1]<br>→ [Part 2: Creating a GUI for Duke][fx2]<br>→ [Part 3: Interacting with the user][fx3]<br>→ [Part 4: Introduction to FXML][fx4]

[fx1]: <tutorials/javaFxTutorialPart1.md>
[fx2]: <tutorials/javaFxTutorialPart2.md>
[fx3]: <tutorials/javaFxTutorialPart3.md>
[fx4]: <tutorials/javaFxTutorialPart4.md>

# Feedback, Bug Reports

* If you have feedback or bug reports, please post in [se-edu/duke issue tracker](https://github.com/se-edu/duke/issues).
* We welcome pull requests too.
All you need to know: [![Build Status](https://travis-ci.com/ReignOfComputer/duke.svg?branch=master)](https://travis-ci.com/ReignOfComputer/duke)
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-hacker
53 changes: 53 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
plugins {
id 'java'
id 'application'
id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

checkstyle {
toolVersion = '8.23'
sourceSets = []
}

shadowJar {
archiveBaseName = "duke"
archiveVersion = "0.3"
archiveClassifier = null
archiveAppendix = null
}

dependencies {
String javaFxVersion = '11.0.2'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
testImplementation 'org.junit.jupiter:junit-jupiter:5.4.2'
}

test {
useJUnitPlatform()
}

group 'duke'
version '0.1.0'

repositories {
mavenCentral()
}

application {
mainClassName = "duke.Launcher"
}

// I miss Visual Studio
// I miss C#
257 changes: 257 additions & 0 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
To completely disable a check, just comment it out or delete it from the file.
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->

<module name = "Checker">
<property name="charset" value="UTF-8"/>

<property name="severity" value="error"/>

<property name="fileExtensions" value="java, properties, xml"/>
<!-- Excludes all 'module-info.java' files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>

<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message"
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
</module>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
<module name="MissingSwitchDefault"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapDot"/>
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapComma"/>
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
<property name="id" value="SeparatorWrapEllipsis"/>
<property name="tokens" value="ELLIPSIS"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
<property name="id" value="SeparatorWrapArrayDeclarator"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapMethodRef"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LambdaParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CatchParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="InterfaceTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="0"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="4"/>
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore">
<property name="tokens"
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="ParenPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<property name="tokens"
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationMostCases"/>
<property name="tokens"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationVariables"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments"
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
<module name="JavadocParagraph"/>
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="public"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
</module>
<module name="CommentsIndentation"/>
</module>
</module>
Loading