diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml new file mode 100644 index 00000000..17378795 --- /dev/null +++ b/.github/workflows/checkstyle.yml @@ -0,0 +1,17 @@ +name: Run checkstyle +# Checkstyle 13+ requires Java 21+. +on: [push, pull_request] +permissions: {} +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + submodules: true + persist-credentials: false + - uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 + with: + distribution: zulu + java-version: 24 + - run: mvn checkstyle:check -B diff --git a/pom.xml b/pom.xml index 542fc6cd..384a7f6a 100644 --- a/pom.xml +++ b/pom.xml @@ -127,6 +127,25 @@ + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + true + checkstyle.xml + checkstyle-suppressions.xml + warning + + + + com.puppycrawl.tools + checkstyle + 13.0.0 + + + maven-javadoc-plugin 3.12.0 @@ -340,43 +359,5 @@ - - - checkstyle-jdk21 - - [21,) - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - true - checkstyle.xml - checkstyle-suppressions.xml - warning - - - - com.puppycrawl.tools - checkstyle - 13.0.0 - - - - - checkstyle - test - - check - - - - - - -