- ALM used (GitHub, private repo)
- CI system used (Github Action)
- Scanner command used when applicable (private details masked)
- Languages of the repository: Java 1.6
Project tree
.
├── dist
│ └── binary.cap
├── init.sh
├── sonar-project.properties
└── src
├── Base32.java
|── Base64.java
My plan is just to scan the .java
source code under the src/
directory.
Our code will be built and deploy locally on a specific computer.
dist/binary.cap
is the built binary for Java card.
Github Action yml
name: SonarCloud
on:
push:
branches:
- ci/ds-4
jobs:
Sonar-build:
name: Analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
- run: pwd && ls -lah
- name: Set up JDK
uses: actions/setup-java@v1.4.2
with:
java-version: "1.6"
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
# with:
# projectBaseDir: ./dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
sonar-project.properties
file
sonar.projectKey=xxx
sonar.organization=xxx
sonar.projectName=xxx
sonar.projectVersion=1.0
sonar.language=java
sonar.sources=./dist
sonar.sourceEncoding=UTF-8