RecordVisitors–Static Analysis with SonarCloud–part 11
Now I should see if the code that I have written is enough good. One way to determine is static analysis – and sonarclould.io is open for open source.
It was pretty simple to setup
1. I have install the tool dotnet-sonarscanner
2. Add the secrets from sonnarcloud to Github
3. Add JAVA to the CI Github Action
– name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
4. run the build with
cd src/RecordVisitors
dotnet dotnet-sonarscanner begin /k:”ignatandrei_RecordVisitors” /o:”ignatandrei-github” /d:sonar.login=”${{ secrets.SONAR_TOKEN }}” /d:sonar.host.url=”https://sonarcloud.io”
dotnet build
dotnet dotnet-sonarscanner end /d:sonar.login=”${{ secrets.SONAR_TOKEN }}”
And now I have quality gate A – see https://sonarcloud.io/dashboard?id=ignatandrei_RecordVisitors
Leave a Reply