Remove Java formatting from build task in CI (#3507)

This saves time in CI spent performing the same source-level checks in
every build job. Checkstyle, PMD, and Spotless are now run once in the
"Lint and Format" job.

The -PskipPMD flag was replaced with a -PskipJavaFormat flag that
disables Checkstyle, PMD, and Spotless.
This commit is contained in:
Tyler Veness
2021-08-07 20:39:14 -07:00
committed by GitHub
parent 09666ff294
commit 252b8c83bf
6 changed files with 35 additions and 13 deletions

View File

@@ -69,3 +69,23 @@ jobs:
run: wpiformat -list-changed-files
- name: Run clang-tidy
run: wpiformat -clang 12 -no-format -tidy-changed -compile-commands=build-cmake
spotless:
name: "Spotless"
runs-on: ubuntu-latest
container: wpilib/ubuntu-base:18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run spotless
run: ./gradlew spotlessCheck
javaformat:
name: "Checkstyle and PMD"
runs-on: ubuntu-latest
container: wpilib/ubuntu-base:18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run Java format
run: ./gradlew javaFormat