-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter files using a command line flag #510
Comments
I wonder if we should glob They would have the cli flag to disable the behavior if it was undesired. |
I think I would find that surprising, if I was a user. In package:wasm I'd want to disable that behavior. I think the distinction is between users who have generated code that was generated by a 3rd party tool (eg protos), or generated by a tool that is part of the package (which is the case in package:wasm). The former case is probably more common, but in the latter case changing this default behavior would be a confusing breaking change. As for whether we just add a flag to exclude |
I'm in favor of a flag which allows arbitrary globs. |
How widely use used is I agree with @liamappelbe that whether I want to skip generated files or not depends on the use case.
In general there will be more of (1) than (2) so ignoring generated files might make sense, but we should make sure code generators use a common suffix like Either way we should have a flag for arbitrary globs. If we ignore some files by default then the design of flags gets a bit more complicated as we will probably also need a flag to not ignore anything by default, or have a flag that is opposite of ignore-file (maybe allow-file). If we don't ignore by default then one flag for ignoring files will do. I say we don't ignore by default to keep things simple for now. If we want to ignore some files by default in the future it will be the same breaking change when we add it now. |
it would be nice to have a yaml file dev_dependencies:
coverage: ^100.0.0
coverage:
ignore:
- '*.g.dart'
- '*.pb.dart' |
It's the main convention I believe. IIRC the analysis server relies on that file pattern to know to only report one issue for a missing import, instead of hundreds for the rest of the file (for type not found, ...). If we had a default pattern here, I would default to that one.
+1 |
Is this enhancement will be planned? It's an awesome idea to have a yml config as @iapicca shared 💯 |
It's not prioritized atm. It's a good first issue though, so contributions are welcome. |
dart-archive/coverage#496 added the command line flag. I'll file a separate issue for the yaml config idea. |
Add a command line flag that works like
// coverage:ignore-file
. It should also be able to handle globs, so that users can ignore all generated files like*.g.dart
.The text was updated successfully, but these errors were encountered: