refactor: drop underscore prefix from member fields #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SonarCloud analysis with JDK 17 on Ubuntu | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: {} | |
| # cancel superseded runs on the same branch/PR to save CI minutes. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| # skip the analysis job for contributors/forks who lack the required sonar token | |
| if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| # disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Set up JDKs (17 for build, 21 for sonarcloud) | |
| uses: actions/setup-java@v6 | |
| with: | |
| java-version: | | |
| 17 | |
| 21 | |
| distribution: temurin | |
| cache: maven | |
| - name: Build with Maven/JDK 17, test with SonarCloud | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: | | |
| # set java_home to jdk 21 for the sonarcloud scanner. | |
| # bytecode remains java 17 compatible due to pom settings. | |
| export JAVA_HOME=$JAVA_HOME_21_X64 | |
| mvn --batch-mode --file pom.xml --activate-profiles sonarcloud clean verify |