From 31325f4893465414d469679e565c09caa9b3c63f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 21 May 2022 20:24:31 +1000 Subject: [PATCH] File name is apparently important... --- .coveragerc | 2 -- .gitignore | 2 +- find_dart_files.py | 7 ++++--- 3 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 8c4a4b78..00000000 --- a/.coveragerc +++ /dev/null @@ -1,2 +0,0 @@ -[run] -source = ./lib \ No newline at end of file diff --git a/.gitignore b/.gitignore index a9ecf32f..07101c9b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ coverage/* # This file is auto-generated as part of the CI process -test/test_touch_files.dart +test/coverage_helper_test.dart # Sentry API key lib/dsn.dart diff --git a/find_dart_files.py b/find_dart_files.py index 614c3d60..ca20e011 100644 --- a/find_dart_files.py +++ b/find_dart_files.py @@ -5,7 +5,7 @@ and generates a 'test' file which includes all these files. This is to ensure that *all* .dart files are included in test coverage. By default, source files which are not touched by the unit tests are not included! -Ref: https://github.com/flutter/flutter/issues/27997#issue-410722816 +Ref: https://github.com/flutter/flutter/issues/27997 """ from pathlib import Path @@ -14,7 +14,7 @@ if __name__ == '__main__': dart_files = Path('lib').rglob('*.dart') - with open("test/test_touch_files.dart", "w") as f: + with open("test/coverage_helper_test.dart", "w") as f: f.write("// ignore_for_file: unused_import\n\n") @@ -29,7 +29,8 @@ if __name__ == '__main__': f.write("// DO NOT EDIT THIS FILE - it has been auto-generated by 'find_dart_files.py'\n") f.write("// It has been created to ensure that *all* source file are included in coverage data\n") - f.write("// Reference: https://github.com/flutter/flutter/issues/27997#issue-410722816\n\n") + + f.write('import "package:test/test.dart";\n\n'); f.write("// Do not actually test anything!\n") f.write("void main() {}\n")