sonar-flutter icon indicating copy to clipboard operation
sonar-flutter copied to clipboard

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

Open PearlDroidOs opened this issue 1 year ago • 1 comments

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.

PearlDroidOs avatar Dec 22 '23 10:12 PearlDroidOs

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

thelineh avatar Jan 11 '24 16:01 thelineh

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

github-actions[bot] avatar Apr 11 '24 02:04 github-actions[bot]

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

github-actions[bot] avatar Apr 25 '24 02:04 github-actions[bot]