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 304c1f7b..5b7a8840 100644 --- a/pom.xml +++ b/pom.xml @@ -128,6 +128,24 @@ + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + true + checkstyle.xml + warning + + + + com.puppycrawl.tools + checkstyle + 13.0.0 + + + org.apache.maven.plugins maven-site-plugin @@ -255,26 +273,6 @@ 4.0.0 - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - - - checkstyle - - - true - - - - - - - sonatype-nexus-staging @@ -344,42 +342,5 @@ - - - checkstyle-jdk21 - - [21,) - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.6.0 - - true - checkstyle.xml - warning - - - - com.puppycrawl.tools - checkstyle - 13.0.0 - - - - - checkstyle - test - - check - - - - - - -