hyiso / lint_staged

Run linters on git staged files for your Flutter and Dart projects. Inspired by JavaScript lint-staged library
https://pub.dev/packages/lint_staged
Apache License 2.0
6 stars 2 forks source link

feat: exclude files pattern #13

Closed bawahakim closed 5 months ago

bawahakim commented 5 months ago

@hyiso couldn't really figure out how to exclude files. Seems glob are inclusive, and in the code, it specifically removes files that are already matched (leaving it no chance to exclude files).

This uses a custom pattern where we can add a ! before the pattern to exclude a pattern.

Should fix #2

hyiso commented 5 months ago

Thanks for the contributing!

Add some integration tests for this will be more helpful

bawahakim commented 5 months ago

Done. Had to fix the failing tests in windows as well.

hyiso commented 5 months ago

0.5.0 is published