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

Simplify "Run analysis" documentation

Open kputh opened this issue 1 year ago • 0 comments

This is more of a remark. README.md uses this code sample

# Download dependencies 
flutter pub get 
# Run tests with User feedback (in case some test are failing)
flutter test
# Run tests without user feedback regeneration tests.output and coverage/lcov.info
flutter test --machine --coverage > tests.output 

I believe these three commands can be condensed into

flutter test --coverage --file-reporter "json:tests.output"

flutter test runs flutter pub get by default, and flutter test --file-reporter prints test results to console and a file at the same time. Combining these three commands into one can save time, particularly in projects with many test cases.

BTW, a better extension of the test results file is probably jsonl.

kputh avatar Nov 15 '23 17:11 kputh