mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 15:30:59 +00:00
add not hit files to coverage percentage
This commit is contained in:
parent
fce20c7154
commit
069a07214c
2 changed files with 8 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -60,4 +60,5 @@ ios/Runner/GoogleService-Info.plist
|
||||||
/lib/firebase_options.dart
|
/lib/firebase_options.dart
|
||||||
|
|
||||||
coverage/
|
coverage/
|
||||||
|
test/coverage_helper_test.dart
|
||||||
screenshots/
|
screenshots/
|
|
@ -1,4 +1,11 @@
|
||||||
flutter test --coverage
|
flutter test --coverage
|
||||||
|
|
||||||
|
file=test/coverage_helper_test.dart
|
||||||
|
echo "// Helper file to make coverage work for all dart files\n" > $file
|
||||||
|
echo "// ignore_for_file: unused_import, directives_ordering" >> $file
|
||||||
|
find lib '!' -path '*generated*/*' '!' -name '*.g.dart' '!' -name '*.part.dart' -name '*.dart' | cut -c4- | awk -v package=$1 '{printf "import '\''package:lightmeter%s%s'\'';\n", package, $1}' >> $file
|
||||||
|
echo "void main() {}" >> $file
|
||||||
|
|
||||||
lcov --remove coverage/lcov.info 'lib/generated/*' 'lib/l10n/*' -o coverage/new_lcov.info
|
lcov --remove coverage/lcov.info 'lib/generated/*' 'lib/l10n/*' -o coverage/new_lcov.info
|
||||||
genhtml coverage/new_lcov.info -o coverage/html
|
genhtml coverage/new_lcov.info -o coverage/html
|
||||||
open coverage/html/index.html
|
open coverage/html/index.html
|
Loading…
Reference in a new issue