From c1d33f03265b4e762b0ea6b69f12d72943898010 Mon Sep 17 00:00:00 2001 From: Ben Manes Date: Mon, 27 Mar 2023 10:40:34 -0700 Subject: [PATCH] upgrade forbiddenApis (static analyzer) --- .github/workflows/analysis.yml | 44 ++++++++++++++++++++++++++++------ gradle/dependencies.gradle | 2 +- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 7bb57abac9..11574a165d 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -5,11 +5,12 @@ on: [ push, pull_request ] env: GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} - JAVA_VERSION: 19 jobs: - analyze: + forbiddenApis: runs-on: ubuntu-latest + env: + JAVA_VERSION: 20 steps: - name: Harden Runner uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 @@ -17,11 +18,40 @@ jobs: disable-sudo: true egress-policy: audit - uses: actions/checkout@v3 - - name: Run analyzers + - name: Forbidden Apis uses: ./.github/actions/run-gradle with: java: ${{ env.JAVA_VERSION }} - arguments: > - forbiddenApis -DforbiddenApis - pmdJavaPoet pmdMain pmdCodeGen pmdJmh -Dpmd - spotbugsJavaPoet spotbugsMain spotbugsCodeGen spotbugsJmh -Dspotbugs + arguments: forbiddenApis -DforbiddenApis + pmd: + runs-on: ubuntu-latest + env: + JAVA_VERSION: 20 + steps: + - name: Harden Runner + uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 + with: + disable-sudo: true + egress-policy: audit + - uses: actions/checkout@v3 + - name: Pmd + uses: ./.github/actions/run-gradle + with: + java: ${{ env.JAVA_VERSION }} + arguments: pmdJavaPoet pmdMain pmdCodeGen pmdJmh -Dpmd + spotbugs: + runs-on: ubuntu-latest + env: + JAVA_VERSION: 20 + steps: + - name: Harden Runner + uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 + with: + disable-sudo: true + egress-policy: audit + - uses: actions/checkout@v3 + - name: Spotbugs + uses: ./.github/actions/run-gradle + with: + java: ${{ env.JAVA_VERSION }} + arguments: spotbugsJavaPoet spotbugsMain spotbugsCodeGen spotbugsJmh -Dspotbugs diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 8990500864..057de4c07e 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -95,7 +95,7 @@ ext { dependencyCheck: '8.2.1', errorprone: '3.0.1', findsecbugs: '1.12.0', - forbiddenApis: '3.4', + forbiddenApis: '3.5', jacoco: '0.8.7', jmh: '0.7.0', jmhReport: '0.9.0',