docs: update coverage_excludes example to something more useful#323
docs: update coverage_excludes example to something more useful#323KyleFin merged 1 commit intoVeryGoodOpenSource:mainfrom juandelgado:patch-1
coverage_excludes example to something more useful#323Conversation
| uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 | ||
| with: | ||
| coverage_excludes: '*.g.dart' | ||
| coverage_excludes: '**/**.g.dart' |
There was a problem hiding this comment.
| coverage_excludes: '**/**.g.dart' | |
| coverage_excludes: '**/*.g.dart' |
I think there is a subtle difference and **/*.g.dart might hit more scenarios?
There was a problem hiding this comment.
Yeah, that's rabbit hole I didn't want to fall into 😅
I did look at the implementation and under the hood minimatch is being used.
My guess is that **/**.g.dart being a bit more eager and catching more scenarios should be a good thing? My head is at "every generated file anywhere should be ignored", but that might be me oversimplifying things.
Happy with either option!
There was a problem hiding this comment.
I agree that we should use whichever is more eager.
I'm not finding examples of patterns ending in /**.ending. I believe ** is more for matching arbitrary directory depth (so it makes more sense to use it in **/, /**/, or /**)
I believe we should use **/*.g.dart here, but not totally sure.
There was a problem hiding this comment.
All in for the more eager option!
From the small research I did I found **/*.g.dart was more eager than **/**.g.dart too.
There was a problem hiding this comment.
Alright, gimme 5, I'll update it.
EDIT: done.
Thanks!
While the current `*.g.dart` example is technically valid, a more useful example would be something like `**/*.g.dart`. The current example only excludes generated files in the root directory where they're rarely placed. The updated `**/*.g.dart` will cover generated files anywhere in the repository, which is probably a lot more helpful to real life scenarios.
Status
READY
Description
While the current
*.g.dartexample is technically valid, a more useful example would be something like**/**.g.dart.The current example only excludes generated files in the root directory where they're rarely placed.
The updated
**/*.g.dartwill cover generated files anywhere in the repository, which is probably a lot more helpful in real life scenarios.Type of Change