Server SonarQube:
- Linux: Ubuntu 20.04
- Developer Edition Version 8.9 (build 43852)
Source Code
- Dotnet Core 3.2 e 5.0
- Files extension *.cs
CI/CD Environment
- Jenkins with Pipeline
- dotnet-sonarscanner 5.3.1 – sonar-scanner-4.6.2.2472
Parameter used
NOTE: I change some values because of privacy and security.
dotnet-sonarscanner begin /k:"PB" /d:sonar.login="$TOKEN" \
/n:"Project BackEnd" \
/v:"$BUILD_NUMBER" \
/d:sonar.verbose="false" \
/d:sonar.host.url="https://domain.com/codeverification" \
/d:sonar.branch.name="$BRANCH_NAME" \
/d:sonar.exclusions="ClientApp/**" \
/d:sonar.sourceEncoding="UTF-8"
dotnet build Project.sln
dotnet-sonarscanner end /d:sonar.login="$TOKEN"
Result
INFO: Analysis report uploaded in 745ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://domain.com/codeverification/dashboard?id=PB&branch=develop
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https://domain.com/codeverification/api/ce/task?id=AXurMLIyCt0QsHalqs3N
INFO: Analysis total time: 7.793 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 22.774s
INFO: Final Memory: 10M/485M
INFO: ------------------------------------------------------------------------
The SonarScanner CLI has finished
PROBLEM
-
First, don’t check the lines of other folders, in other words, not doing the analysis.
NOTE: Inside these folders, I have a lot of files *.cs.
-
Second, I try to exclude ClientApp but continue to load.
-
Third, I am receiving these two warnings.
Conclusion
I don’t know what’s happening, why the sonar is not getting those files, and analyzing the files inside the folders.