- Versions:
- SonarQube: Community Edition
v10.6
- .NET Sonar scanner (via NuGet package
dotnet-sonarscanner
, running as .NET local tool, i.e. viadotnet-tools.json
):v9.0.1
- SonarQube: Community Edition
- how is SonarQube deployed: I don’t know (probably Docker)
- what are you trying to achieve: finalize Sonar analysis via
dotnet tool run dotnet-sonarscanner end
- what have you tried so far to achieve this:
- Tested with
v9.0.1
→ - Tested with
v9.0.0
→ - Tested with
v8.0.0
→ - Tested with
v7.1.1
→
- Tested with
Logs
Following you find the logs when running dotnet tool run dotnet-sonarscanner end
with v9.0.1
:
08:58:08 + dotnet tool run dotnet-sonarscanner end
08:58:11 SonarScanner for MSBuild 9.0.1
08:58:11 Using the .NET Core version of the Scanner for MSBuild
08:58:11 Post-processing started.
08:58:11 07:58:08.536 Starting with Scanner for .NET v8 the way the `sonar.projectBaseDir` property is automatically detected has changed and this has an impact on the files that are analyzed and other properties that are resolved relative to it like `sonar.exclusions` and `sonar.test.exclusions`. If you would like to customize the behavior, please set the `sonar.projectBaseDir` property to point to a directory that contains all the source code you want to analyze. The path may be relative (to the directory from which the analysis was started) or absolute.
08:58:11 Calling the SonarScanner CLI...
08:58:11 INFO: Scanner configuration file: /home/jenkins/agent/.nuget/packages/dotnet-sonarscanner/9.0.1/tools/netcoreapp3.1/any/sonar-scanner-5.0.1.3006/conf/sonar-scanner.properties
08:58:11 INFO: Project root configuration file: /home/jenkins/agent/workspace/ate_major-all-dotnet-local-tools/.sonarqube/out/sonar-project.properties
08:58:11 INFO: SonarScanner 5.0.1.3006
08:58:11 INFO: Java 17.0.11 Eclipse Adoptium (64-bit)
08:58:11 INFO: Linux 5.10.226-214.879.amzn2.x86_64 amd64
08:58:11 INFO: User cache: ?/.sonar/cache
08:58:18 INFO: Analyzing on SonarQube server 10.6.0.92116
08:58:18 INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
08:58:18 INFO: Load global settings
08:58:18 INFO: Load global settings (done) | time=226ms
08:58:18 INFO: Server id: 3A2253F6-AW0qupzI6yeggYxMEb6x
08:58:18 INFO: Loading required plugins
08:58:18 INFO: Load plugins index
08:58:18 INFO: Load plugins index (done) | time=103ms
08:58:18 INFO: Load/download plugins
08:58:29 INFO: Load/download plugins (done) | time=11720ms
08:58:29 INFO: Process project properties
08:58:29 INFO: Process project properties (done) | time=34ms
08:58:29 INFO: Project key: my-application
08:58:29 INFO: Base dir: /home/jenkins/agent/workspace/ate_major-all-dotnet-local-tools
08:58:29 INFO: Working dir: /home/jenkins/agent/workspace/ate_major-all-dotnet-local-tools/.sonarqube/out/.sonar
08:58:29 INFO: Load project settings for component key: 'my-application'
08:58:29 INFO: Load project settings for component key: 'my-application' (done) | time=86ms
08:58:29 INFO: Load project branches
08:58:29 INFO: Load project branches (done) | time=85ms
08:58:29 INFO: Load branch configuration
08:58:29 INFO: Load branch configuration (done) | time=2ms
08:58:29 INFO: Load quality profiles
08:58:29 INFO: Load quality profiles (done) | time=104ms
08:58:29 INFO: Auto-configuring with CI 'Jenkins'
08:58:29 INFO: Load active rules
08:58:32 INFO: Load active rules (done) | time=3651ms
08:58:32 INFO: Load analysis cache
08:58:32 INFO: Load analysis cache | time=99ms
08:58:33 INFO: Branch name: renovate/major-all-dotnet-local-tools
08:58:33 INFO: Preprocessing files...
08:58:33 INFO: ------------------------------------------------------------------------
08:58:33 INFO: EXECUTION FAILURE
08:58:33 INFO: ------------------------------------------------------------------------
08:58:33 INFO: Total time: 24.752s
08:58:33 INFO: Final Memory: 11M/44M
08:58:33 INFO: ------------------------------------------------------------------------
08:58:33 ERROR: Error during SonarScanner execution
08:58:33 java.lang.IllegalStateException: Failed to preprocess files
08:58:33 at org.sonar.scanner.scan.filesystem.ProjectFilePreprocessor.processModuleSources(ProjectFilePreprocessor.java:164)
08:58:33 at org.sonar.scanner.scan.filesystem.ProjectFilePreprocessor.processModule(ProjectFilePreprocessor.java:140)
08:58:33 at org.sonar.scanner.scan.filesystem.ProjectFilePreprocessor.processModulesRecursively(ProjectFilePreprocessor.java:128)
08:58:33 at org.sonar.scanner.scan.filesystem.ProjectFilePreprocessor.execute(ProjectFilePreprocessor.java:103)
08:58:33 at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:350)
08:58:33 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
08:58:33 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
08:58:33 at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
08:58:33 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
08:58:33 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
08:58:33 at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
08:58:33 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
08:58:33 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
08:58:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
08:58:33 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
08:58:33 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
08:58:33 at java.base/java.lang.reflect.Method.invoke(Unknown Source)
08:58:33 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
08:58:33 at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
08:58:33 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
08:58:33 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
08:58:33 at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
08:58:33 at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
08:58:33 at org.sonarsource.scanner.cli.Main.main(Main.java:62)
08:58:33 Caused by: java.nio.file.NoSuchFileException: /home/jenkins/agent/workspace/ate_major-all-dotnet-local-tools/ws8308417f-37eb-4e6a-9791-fc17baa0c210/stylecop.json
08:58:33 at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
08:58:33 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
08:58:33 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
08:58:33 at java.base/sun.nio.fs.UnixPath.toRealPath(Unknown Source)
08:58:33 at org.sonar.scanner.scan.filesystem.FilePreprocessor.processFile(FilePreprocessor.java:61)
08:58:33 at org.sonar.scanner.scan.filesystem.ProjectFilePreprocessor.processModuleSources(ProjectFilePreprocessor.java:159)
08:58:33 ... 23 more
08:58:33 ERROR:
08:58:33 The SonarScanner did not complete successfully