Skip to content

Commit

Permalink
upgrade forbiddenApis (static analyzer)
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Mar 27, 2023
1 parent 17490f8 commit c1d33f0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
44 changes: 37 additions & 7 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,53 @@ 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
with:
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
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c1d33f0

Please sign in to comment.