Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FATAL] pubspec.yaml does not exist in Monorepository #215

Open
santitigaga opened this issue Apr 16, 2024 · 0 comments
Open

[FATAL] pubspec.yaml does not exist in Monorepository #215

santitigaga opened this issue Apr 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@santitigaga
Copy link

Problem

if you try to analyze the project in the root folder of the repository it will fail because the sensorContext is located from where the sonar-scanner is executed.

INFO: Sensor Dart sensor [flutter] (done) | time=3494ms
INFO: Sensor Dart pubspec.yaml sensor [flutter]
INFO: Sensor Dart pubspec.yaml sensor [flutter] (done) | time=4ms
INFO: Sensor Dart analysis sensor [flutter]
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 32.165s
INFO: Final Memory: 65M/224M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalArgumentException: /home/pubspec.yaml does not exist

java.lang.IllegalArgumentException: /home/pubspec.yaml does not exist
##[error]at fr.insideapp.sonarqube.dart.lang.PubSpecParser.parse(PubSpecParser.java:49)
	at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:66)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
	at fr.insideapp.sonarqube.dart.lang.PubSpecParser.parse(PubSpecParser.java:49)
	at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:66)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
...

Temporary

A possible solution is to add the property
sonar.projectBaseDir property in the sonar-scanner properties, at least while it is set to support executions outside this context.

@zippy1978 zippy1978 added the bug Something isn't working label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants