Skip to content

sonar-findbugs v4.5.0 #1486

sonar-findbugs v4.5.0

sonar-findbugs v4.5.0 #1486

Workflow file for this run

on:
push:
branches:
- master
- sq-10
release:
types:
- created
# set necessary permissions for SQ's GitHub integration
# https://docs.sonarqube.org/latest/analysis/github-integration/#header-2
permissions:
checks: write
contents: read
pull-requests: write
statuses: read
jobs:
build:
if: github.repository_owner == 'spotbugs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: |
~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build
run: |
./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B -e -V -DskipITs \
-Dsonar.server.version=${{ env.SONAR_SERVER_VERSION }} \
-Dsonar-plugin-api.version=${{ env.SONAR_PLUGIN_API_VERSION }} \
-Dsonar.projectKey=com.github.spotbugs:sonar-findbugs-plugin \
-Dsonar.organization=spotbugs \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.token=$SONAR_TOKEN \
${PR_NUMBER:+ -Dsonar.pullrequest.key=$PR_NUMBER -Dsonar.pullrequest.branch=$PR_BRANCH }
env:
# previous LTS version
SONAR_SERVER_VERSION: 9.9.7.96285
SONAR_PLUGIN_API_VERSION: 9.14.0.375
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_BRANCH: ${{ github.event.pull_request.head.ref }}