You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sonar version:10.6
sonar-flutter-plugin-0.5.2.jar
We run sonar in an app which developed with dart.Then we met an error like below:
09:48:20 + sonar-scanner -Dsonar.projectKey=elev:mobile-mnk -Dsonar.projectName=elev:mobile-mnk -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=. -Dsonar.flutter.analyzer.mode=dart '-Dsonar.exclusions=/*.java,/.classes,**/.kt' -Dsonar.login=admin -Dsonar.password=****
09:48:20 09:48:20.647 INFO Scanner configuration file: /opt/sonarqube/sonar-scanner-6.2.1.4610-macosx-aarch64/conf/sonar-scanner.properties
09:48:20 09:48:20.649 INFO Project root configuration file: NONE
09:48:20 09:48:20.660 INFO SonarScanner CLI 6.2.1.4610
09:48:20 09:48:20.661 INFO Java 17.0.12 Eclipse Adoptium (64-bit)
09:48:20 09:48:20.661 INFO Mac OS X 14.6.1 aarch64
09:48:20 09:48:20.678 INFO User cache: /Users/feikaifeng/.sonar/cache
09:48:21 09:48:21.088 INFO JRE provisioning: os[macos], arch[arm64]
09:48:21 09:48:21.432 INFO Communicating with SonarQube Server 10.6.0.92116
09:48:22 09:48:21.631 INFO Starting SonarScanner Engine...
09:48:22 09:48:21.631 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
09:48:22 09:48:22.031 INFO Load global settings
09:48:22 09:48:22.383 INFO Load global settings (done) | time=352ms
09:48:22 09:48:22.385 INFO Server id: 9CFC3560-AZElwVoJ-6yAobJJKCaa
09:48:22 09:48:22.391 INFO Loading required plugins
09:48:22 09:48:22.392 INFO Load plugins index
09:48:22 09:48:22.706 INFO Load plugins index (done) | time=313ms
09:48:22 09:48:22.707 INFO Load/download plugins
09:48:23 09:48:23.556 INFO Load/download plugins (done) | time=852ms
09:48:24 09:48:23.726 INFO Process project properties
09:48:24 09:48:23.729 INFO Process project properties (done) | time=3ms
09:48:24 09:48:23.733 INFO Project key: elev:mobile-mnk
09:48:24 09:48:23.733 INFO Base dir: /Users/feikaifeng/Jenkins-scan/workspace/scan-sonar/elev/mobile-mnk
09:48:24 09:48:23.733 INFO Working dir: /Users/feikaifeng/Jenkins-scan/workspace/scan-sonar/elev/mobile-mnk/.scannerwork
09:48:24 09:48:23.736 INFO Load project settings for component key: 'elev:mobile-mnk'
09:48:24 09:48:23.959 INFO Load project settings for component key: 'elev:mobile-mnk' (done) | time=223ms
09:48:24 09:48:23.980 INFO Load quality profiles
09:48:24 09:48:24.313 INFO Load quality profiles (done) | time=332ms
09:48:24 09:48:24.319 INFO Auto-configuring with CI 'Jenkins'
09:48:24 09:48:24.330 INFO Load active rules
09:48:34 09:48:33.426 INFO Load active rules (done) | time=9096ms
09:48:34 09:48:33.429 INFO Load analysis cache
09:48:34 09:48:33.716 INFO Load analysis cache (404) | time=286ms
09:48:34 09:48:33.980 WARN The properties 'sonar.login' and 'sonar.password' are deprecated and will be removed in the future. Please pass a token with the 'sonar.token' property instead.
09:48:34 09:48:33.998 INFO Preprocessing files...
09:48:34 09:48:34.591 INFO 4 languages detected in 1002 preprocessed files
09:48:34 09:48:34.591 INFO 26 files ignored because of inclusion/exclusion patterns
09:48:34 09:48:34.591 INFO 4328 files ignored because of scm ignore settings
09:48:34 09:48:34.592 INFO Loading plugins for detected languages
09:48:34 09:48:34.592 INFO Load/download plugins
09:48:34 09:48:34.595 INFO Load/download plugins (done) | time=3ms
09:48:34 09:48:34.650 INFO Load project repositories
09:48:35 09:48:34.945 INFO Load project repositories (done) | time=295ms
09:48:35 09:48:34.966 INFO Indexing files...
09:48:35 09:48:34.966 INFO Project configuration:
09:48:35 09:48:34.966 INFO Excluded sources: **/.java, **/.classes, **/*.kt
09:48:35 09:48:35.009 INFO 1002 files indexed
09:48:35 09:48:35.009 INFO Quality profile for dart: dartanalyzer
09:48:35 09:48:35.009 INFO Quality profile for json: Sonar way
09:48:35 09:48:35.009 INFO Quality profile for xml: Sonar way
09:48:35 09:48:35.009 INFO Quality profile for yaml: Sonar way
09:48:35 09:48:35.010 INFO ------------- Run sensors on module elev:mobile-mnk
09:48:35 09:48:35.030 INFO Load metrics repository
09:48:35 09:48:35.249 INFO Load metrics repository (done) | time=218ms
09:48:35 09:48:35.447 INFO Sensor Dart sensor [flutter]
09:48:40 09:48:40.673 INFO Sensor Dart sensor [flutter] (done) | time=5226ms
09:48:40 09:48:40.673 INFO Sensor Dart pubspec.yaml sensor [flutter]
09:48:40 09:48:40.674 INFO Sensor Dart pubspec.yaml sensor [flutter] (done) | time=1ms
09:48:40 09:48:40.674 INFO Sensor Dart analysis sensor [flutter]
09:48:40 09:48:40.698 INFO Detected Flutter project with version 3.10.23+196
09:48:40 09:48:40.699 INFO Backup of original analysis_options.yaml file to analysis_options.yaml.sonar
09:48:40 09:48:40.708 INFO Running 'flutter [analyze, --no-fatal-warnings, --no-fatal-infos]'
09:48:54 09:48:52.956 INFO Command 'flutter analyze --no-fatal-warnings --no-fatal-infos' finished (exit 1)
09:48:54 09:48:52.991 INFO Restored original analysis_options.yaml file
09:48:54 09:48:53.592 INFO Recording 86472 issues
09:48:54 09:48:53.673 ERROR Error during SonarScanner Engine execution
09:48:54 java.lang.IllegalArgumentException: 10 is not a valid line for pointer. File analysis_options.yaml has 8 line(s)
09:48:54 at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:371)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:307)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.selectLine(DefaultInputFile.java:330)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerReportIssue.toNewIssueLocationFor(DartAnalyzerReportIssue.java:114)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.lambda$recordIssues$0(DartAnalyzerSensor.java:100)
09:48:54 at java.base/java.util.ArrayList.forEach(Unknown Source)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.recordIssues(DartAnalyzerSensor.java:89)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:80)
09:48:54 at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
09:48:54 at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
09:48:54
09:48:54 09:48:54.179 INFO EXECUTION FAILURE
09:48:54 09:48:54.180 INFO Total time: 33.549s
The file analysis_options.yaml is in the attachment
Moreover,when we put the analysis_options.yaml in sonar.exclusions,the scan successed with warn like this:
File not included in SonarQube /Users/feikaifeng/Jenkins-sscan/workspace/scan-sonar/elev/mobile-mnk/analysis_opticns.yaml
I'm worried that if the file is exclued,the result will be not correct.So I want to know how to fix this error,and wheather it is a bug of our plugin.
Waiting for your answers,tks
The text was updated successfully, but these errors were encountered:
sonar version:10.6
sonar-flutter-plugin-0.5.2.jar
We run sonar in an app which developed with dart.Then we met an error like below:
09:48:20 + sonar-scanner -Dsonar.projectKey=elev:mobile-mnk -Dsonar.projectName=elev:mobile-mnk -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=. -Dsonar.flutter.analyzer.mode=dart '-Dsonar.exclusions=/*.java,/.classes,**/.kt' -Dsonar.login=admin -Dsonar.password=****
09:48:20 09:48:20.647 INFO Scanner configuration file: /opt/sonarqube/sonar-scanner-6.2.1.4610-macosx-aarch64/conf/sonar-scanner.properties
09:48:20 09:48:20.649 INFO Project root configuration file: NONE
09:48:20 09:48:20.660 INFO SonarScanner CLI 6.2.1.4610
09:48:20 09:48:20.661 INFO Java 17.0.12 Eclipse Adoptium (64-bit)
09:48:20 09:48:20.661 INFO Mac OS X 14.6.1 aarch64
09:48:20 09:48:20.678 INFO User cache: /Users/feikaifeng/.sonar/cache
09:48:21 09:48:21.088 INFO JRE provisioning: os[macos], arch[arm64]
09:48:21 09:48:21.432 INFO Communicating with SonarQube Server 10.6.0.92116
09:48:22 09:48:21.631 INFO Starting SonarScanner Engine...
09:48:22 09:48:21.631 INFO Java 17.0.11 Eclipse Adoptium (64-bit)
09:48:22 09:48:22.031 INFO Load global settings
09:48:22 09:48:22.383 INFO Load global settings (done) | time=352ms
09:48:22 09:48:22.385 INFO Server id: 9CFC3560-AZElwVoJ-6yAobJJKCaa
09:48:22 09:48:22.391 INFO Loading required plugins
09:48:22 09:48:22.392 INFO Load plugins index
09:48:22 09:48:22.706 INFO Load plugins index (done) | time=313ms
09:48:22 09:48:22.707 INFO Load/download plugins
09:48:23 09:48:23.556 INFO Load/download plugins (done) | time=852ms
09:48:24 09:48:23.726 INFO Process project properties
09:48:24 09:48:23.729 INFO Process project properties (done) | time=3ms
09:48:24 09:48:23.733 INFO Project key: elev:mobile-mnk
09:48:24 09:48:23.733 INFO Base dir: /Users/feikaifeng/Jenkins-scan/workspace/scan-sonar/elev/mobile-mnk
09:48:24 09:48:23.733 INFO Working dir: /Users/feikaifeng/Jenkins-scan/workspace/scan-sonar/elev/mobile-mnk/.scannerwork
09:48:24 09:48:23.736 INFO Load project settings for component key: 'elev:mobile-mnk'
09:48:24 09:48:23.959 INFO Load project settings for component key: 'elev:mobile-mnk' (done) | time=223ms
09:48:24 09:48:23.980 INFO Load quality profiles
09:48:24 09:48:24.313 INFO Load quality profiles (done) | time=332ms
09:48:24 09:48:24.319 INFO Auto-configuring with CI 'Jenkins'
09:48:24 09:48:24.330 INFO Load active rules
09:48:34 09:48:33.426 INFO Load active rules (done) | time=9096ms
09:48:34 09:48:33.429 INFO Load analysis cache
09:48:34 09:48:33.716 INFO Load analysis cache (404) | time=286ms
09:48:34 09:48:33.980 WARN The properties 'sonar.login' and 'sonar.password' are deprecated and will be removed in the future. Please pass a token with the 'sonar.token' property instead.
09:48:34 09:48:33.998 INFO Preprocessing files...
09:48:34 09:48:34.591 INFO 4 languages detected in 1002 preprocessed files
09:48:34 09:48:34.591 INFO 26 files ignored because of inclusion/exclusion patterns
09:48:34 09:48:34.591 INFO 4328 files ignored because of scm ignore settings
09:48:34 09:48:34.592 INFO Loading plugins for detected languages
09:48:34 09:48:34.592 INFO Load/download plugins
09:48:34 09:48:34.595 INFO Load/download plugins (done) | time=3ms
09:48:34 09:48:34.650 INFO Load project repositories
09:48:35 09:48:34.945 INFO Load project repositories (done) | time=295ms
09:48:35 09:48:34.966 INFO Indexing files...
09:48:35 09:48:34.966 INFO Project configuration:
09:48:35 09:48:34.966 INFO Excluded sources: **/.java, **/.classes, **/*.kt
09:48:35 09:48:35.009 INFO 1002 files indexed
09:48:35 09:48:35.009 INFO Quality profile for dart: dartanalyzer
09:48:35 09:48:35.009 INFO Quality profile for json: Sonar way
09:48:35 09:48:35.009 INFO Quality profile for xml: Sonar way
09:48:35 09:48:35.009 INFO Quality profile for yaml: Sonar way
09:48:35 09:48:35.010 INFO ------------- Run sensors on module elev:mobile-mnk
09:48:35 09:48:35.030 INFO Load metrics repository
09:48:35 09:48:35.249 INFO Load metrics repository (done) | time=218ms
09:48:35 09:48:35.447 INFO Sensor Dart sensor [flutter]
09:48:40 09:48:40.673 INFO Sensor Dart sensor [flutter] (done) | time=5226ms
09:48:40 09:48:40.673 INFO Sensor Dart pubspec.yaml sensor [flutter]
09:48:40 09:48:40.674 INFO Sensor Dart pubspec.yaml sensor [flutter] (done) | time=1ms
09:48:40 09:48:40.674 INFO Sensor Dart analysis sensor [flutter]
09:48:40 09:48:40.698 INFO Detected Flutter project with version 3.10.23+196
09:48:40 09:48:40.699 INFO Backup of original analysis_options.yaml file to analysis_options.yaml.sonar
09:48:40 09:48:40.708 INFO Running 'flutter [analyze, --no-fatal-warnings, --no-fatal-infos]'
09:48:54 09:48:52.956 INFO Command 'flutter analyze --no-fatal-warnings --no-fatal-infos' finished (exit 1)
09:48:54 09:48:52.991 INFO Restored original analysis_options.yaml file
09:48:54 09:48:53.592 INFO Recording 86472 issues
09:48:54 09:48:53.673 ERROR Error during SonarScanner Engine execution
09:48:54 java.lang.IllegalArgumentException: 10 is not a valid line for pointer. File analysis_options.yaml has 8 line(s)
09:48:54 at org.sonar.api.utils.Preconditions.checkArgument(Preconditions.java:43)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:371)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:307)
09:48:54 at org.sonar.api.batch.fs.internal.DefaultInputFile.selectLine(DefaultInputFile.java:330)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerReportIssue.toNewIssueLocationFor(DartAnalyzerReportIssue.java:114)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.lambda$recordIssues$0(DartAnalyzerSensor.java:100)
09:48:54 at java.base/java.util.ArrayList.forEach(Unknown Source)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.recordIssues(DartAnalyzerSensor.java:89)
09:48:54 at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:80)
09:48:54 at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
09:48:54 at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
09:48:54 at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
09:48:54 at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
09:48:54 at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
09:48:54 at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
09:48:54
09:48:54 09:48:54.179 INFO EXECUTION FAILURE
09:48:54 09:48:54.180 INFO Total time: 33.549s
The file analysis_options.yaml is in the attachment
Moreover,when we put the analysis_options.yaml in sonar.exclusions,the scan successed with warn like this:
File not included in SonarQube /Users/feikaifeng/Jenkins-sscan/workspace/scan-sonar/elev/mobile-mnk/analysis_opticns.yaml
I'm worried that if the file is exclued,the result will be not correct.So I want to know how to fix this error,and wheather it is a bug of our plugin.
Waiting for your answers,tks
The text was updated successfully, but these errors were encountered: