I am making a project for CRM. I need to upload the platform code to the folder (Autogenerated\Src) so that my code can compile.
If I start scanning, the scanner scans the platform and hangs in an endless build.
Tried to exclude the folder with the command
/SonarScanner.MSBuild.exe begin /k:"blablablakey" d:sonar.host.url="blablablaurl" /d:sonar.login="blablablalogin" /d:sonar.scanner.scanAll=false /d:sonar.exclusions="**/Autogenerated/**, **/obj/**, **/Terrasoft.Configuration.Tests/**, **/*.js, **/*.json, **/*.xml"'
before build and sonar scanner end
But the scanner continues to scan and freezes
Hangs at the build stage.
Without sonarscanner, the build completes in 40 minutes.
SonarQube: Community Edition Version 9.9 (build 65466)
SonarScanner: 10.1.1.111189 net-framework (
Since the system supports the assembly of net core, I tried 10.1.1.111189 net core)
CRM System: Creatio 7.15.4.3055
Project SDK: Microsoft.NET.Sdk
Target framework: net472
Code: C#
Just in case: Terrasoft.Configuration.Dev.zip (1.5 KB)
Solving the problem.
I recorded all the errors from Issues.json via powershell (since it is large, I had to use powershell), which occur in the folder (Autogenerated\Src).
And because this is not a human-modifiable code (BPM Creatio library code).
Suppressed errors in .editorconfig.
root = true
[Autogenerated/Src/*.cs]
dotnet_diagnostic.S2386.severity = none
dotnet_diagnostic.S4790.severity = none
dotnet_diagnostic.S5443.severity = none
…And so on
Only the latest version of SonarQube Community Build is considered active, so you’ll need to upgrade and see if the situation is still replicable before we can help you.
And I don’t understand how updating SonarQube will help me. If the problem is in SonarScanner, it scans the platform code, and I only need the user code.
Because of this, Issues.json is 2-3 GB in size and cannot be processed.
Even a text editor can’t open it.
I need to exclude the “Autogenerated\Src” folder from the analysis
The code developed by the developers is in Pkg
I tried:
Exclude by parameter in the command.
/d:sonar.exclusions=“**\Autogenerated\Src**.cs”
With each new version of SonarQube, its underlying analyzers are updated. Typically these updates include new features, yes, but also bug fixes and performance improvements.
You’re complaining that adding analysis causes the build to hang. For C#, analysis mainly runs during the build, so picking up the improvements in a non-EOL version could absolutely impact your build performance.
Regarding your exclusions, you might want to take another look at the wildcard patterns.
Hello, Ann.
I managed to complete Build.
And it turned out that the files from the Autogenerated\Src folder did not get into the FilesToAnalyze.txt file
But the Issue.json file is very large 2.8GB.
I managed to open it via powershell.
And there are warnings for files in the Autogenerated\Src folder.
How can I exclude warnings from getting into the Issues.json file related to the Autogenerated\Src folder.
I tried to do the following
1.Disable warnings via csproj file