diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000000..d1215b1a10 --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,37 @@ +name: Java CI + +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + + steps: + - name: Set up repository + uses: actions/checkout@master + + - name: Set up repository + uses: actions/checkout@master + with: + ref: master + + - name: Merge to master + run: git checkout --progress --force ${{ github.sha }} + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Setup JDK 11 + uses: actions/setup-java@v1 + with: + java-version: '11' + java-package: jdk+fx + + - name: Add execute permission to gradlew + run: chmod +x ./gradlew + + - name: Build and check with Gradle + run: ./gradlew check \ No newline at end of file diff --git a/src/main/java/corgi/parsers/CommandParser.java b/src/main/java/corgi/parsers/CommandParser.java index 9dc06fb61c..3f4a799316 100644 --- a/src/main/java/corgi/parsers/CommandParser.java +++ b/src/main/java/corgi/parsers/CommandParser.java @@ -237,7 +237,7 @@ private Command newAddDeadlineCommand(String[] inputs) throws InvalidCommandForm private Command newAddEventCommand(String[] inputs) throws InvalidCommandFormatException { String commandFormat = CommandType.EVENT.getCommandFormat(); - + if (inputs.length == 1) { throw new InvalidCommandFormatException("No argument is provided!" + "\nFormat: " + commandFormat);