Allow glob exclusions
See original GitHub issueSome projects commit build (dist) files to the repository. Usually, the syntax of these generated files is out of the scope of linters. But ATM all files that matches the glob pattern will run against linters.
Ideally we want *-staged
tasks to be configured the same way as normal linter tasks.
But this might require a major rewrite and switch to the Node from CLI.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
glob exclude pattern - python - Stack Overflow
You can't exclude patterns with the glob function, globs only allow for inclusion patterns. Globbing syntax is very limited (even a [!.
Read more >Exclude one pattern from glob match - Unix Stack Exchange
GlennJackman's answer shows how to enable extended pattern matching features to negate a match. – Johnny. Oct 24, 2014 at 17:33. Add a...
Read more >Glob Pattern Exclude Directory in Python - Codeigo
We will start by covering the basics of glob. To see how directories are excluded, you can go directly to the Section “Excluding...
Read more >Tips for writing glob patterns in DeepSource configuration
exclude_patterns are a list of glob patterns that should be excluded when the analyses are run. These patterns should be relative to the ......
Read more >Global Exclusions - Sophos Central Admin
To set exclusions: Go to Global Settings > Global Exclusions. Click Add Exclusion. The Add Exclusion dialog is displayed.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ouch, this burned me too. I was trying to use
!(node_modules|dist|lib|es)**/*.js
for my pattern. And the minimatch docs say:If the pattern starts with a ! character, then it is negated. Set the nonegate flag to suppress this behavior, and treat leading ! characters normally. This is perhaps relevant if you wish to start the pattern with a negative extglob pattern like !(a|B). Multiple ! characters at the start of a pattern will negate the pattern multiple times.
I’m trying to see if there’s a way to work around this with a different pattern, but otherwise I’ll have to think about making a PR to support passing the
nonegate
flag to minimatch somehow…For anyone who stumbles upon this issue like me it now supports glob match but uses micromatch now read this post I added for the fix. https://stackoverflow.com/a/57981925/1221731