insideapp-oss / sonar-flutter

SonarQube plugin for Flutter / Dart
Other
449 stars 82 forks source link

Issue Multi-Module for code coverage does not show in a report #202

Closed PearlDroidOs closed 7 months ago

PearlDroidOs commented 11 months ago

Dear all, I have an issue for code coverage of multi-module which does not show in a report.

I have a Flutter project structure like this:

Flutter Project
   - pubspec.yaml
   - test
   - feature1 (modular project)/
             - pubspec.yaml
             - test
   - feature2 (modular project)/
             - pubspec.yaml
             - test
   - feature3 (modular project)/
             - pubspec.yaml
             - test

and sonar-project.properties file of the Flutter Project , I config like this:

sonar.modules=feature1,feature2,feature3

sonar.projectKey=myProject
sonar.modules=feature1,feature2,feature3
sonar.dart.analyzer.options.override=true

sonar.sources=lib,pubspec.yaml
sonar.tests=test

feature1.sonar.sources=lib,pubspec.yaml
feature1.sonar.tests=test
feature1.sonar.dart.analyzer.options.override=false
feature1.sonar.dart.analyzer.report.path=build/reports/analysis-results.txt

feature2.sonar.sources=lib,pubspec.yaml
feature2.sonar.tests=test
feature2.sonar.dart.analyzer.options.override=false
feature2.sonar.dart.analyzer.report.path=build/reports/analysis-results.txt

feature3.sonar.sources=lib,pubspec.yaml
feature3.sonar.tests=test
feature3.sonar.dart.analyzer.options.override=false
feature3.sonar.dart.analyzer.report.path=build/reports/analysis-results.txt

After I ran these commands of the root Flutter Project:

flutter test
flutter test --machine --coverage > tests.output 
sonar-scanner 

The report does not show the coverage percentage of each module projects. Are there any way to do it? Am I wrong for configuration or command run?

Please kindly help and suggest me to solve the problem. Thank you.

thelineh commented 10 months ago

regarding to this issue, that I've been also facing, what would be the definition of those "modules" we can configure? I've got some packages in my app, inside a packages folder

github-actions[bot] commented 7 months ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 7 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.