I am following the tutorial from Static Code Analysis with SonarQube with Flutter | by Arindam Ghosh | Medium
I am using docker as sonarqube. I have run the below command to run sonarqube container
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube:10.1.0-community
- which versions are you using sonarqube:10.1.0-community
- how is SonarQube deployed: Docker
- what are you trying to achieve need to run sonar-scanner command successfully to scan my flutter appllication
when I run the sonar-scanner command, it is giving an error
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=28ms
INFO: Load/download plugins (done) | time=662ms
INFO: Process project properties
INFO: Process project properties (done) | time=5ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=1ms
INFO: Project key: pinpoint-fl-app
INFO: Base dir: /home/paranjay-patel-us/Development/projects/logicwind/pinpoint/pinpoint-fl-app
INFO: Working dir: /home/paranjay-patel-us/Development/projects/logicwind/pinpoint/pinpoint-fl-app/.scannerwork
INFO: Load project settings for component key: 'pinpoint-fl-app'
INFO: Load project settings for component key: 'pinpoint-fl-app' (done) | time=17ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=39ms
INFO: Load active rules
INFO: Load active rules (done) | time=1265ms
INFO: Load analysis cache
INFO: Load analysis cache (404) | time=5ms
WARN: The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
INFO: Load project repositories
INFO: Load project repositories (done) | time=15ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: test/**/*_test.mocks.dart, lib/**/*.g.dart
INFO: 85 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for dart: dartanalyzer
INFO: ------------- Run sensors on module pinpoint-fl-app
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=13ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=1ms
INFO: Sensor CSS Rules [javascript]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=1ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=0ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=8ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor Dart sensor [flutter]
WARN: Duplication reported for 'test/widget_test.dart' will be ignored because it's a test file.
INFO: Sensor Dart sensor [flutter] (done) | time=475ms
INFO: Sensor Dart pubspec.yaml sensor [flutter]
INFO: Sensor Dart pubspec.yaml sensor [flutter] (done) | time=1ms
INFO: Sensor Dart analysis sensor [flutter]
INFO: Detected Flutter project with version 1.0.0+1
INFO: Backup of original analysis_options.yaml file to analysis_options.yaml.sonar
INFO: Running 'flutter [analyze, --no-fatal-warnings, --no-fatal-infos]'
INFO: Command 'flutter analyze --no-fatal-warnings --no-fatal-infos' finished (exit 1)
INFO: Restored original analysis_options.yaml file
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 12.908s
INFO: Final Memory: 30M/120M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Error while running 'flutter analyze --no-fatal-warnings --no-fatal-infos' (exit 1): 6640 issues found. (ran in 6.7s)
at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.executable.AnalyzerExecutable.maybeThrowException(AnalyzerExecutable.java:103)
at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.executable.AnalyzerExecutable.analyze(AnalyzerExecutable.java:91)
at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:67)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:403)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:399)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:368)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.