-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
Does not match for negative ignore #409
Comments
Pattern negation isn't supported, in the main pattern or in the ignore option. Why not just glob for the thing you're un-negating? |
Here's a concrete examples of why glob negation is helpful in the configuration of cSpell: I want to spell-check my english localization strings, but not localized strings in any other language: "src/locales/**",
"!src/locales/en.yaml", |
@justingrant Ok, so use an glob('src/locales/**', { ignore: 'src/locales/en.yaml' }) |
The challenge (at least in this use case) is when the list is already negated, like in a .gitignore file or (like in this case) a JSON config file that can't call "ignorePaths": [
"src/locales/[^e]*.*",
"src/locales/es.yaml",
], |
I have following structure:
When I run
I expect to get
[ 'data/section/file1.json' ]
but got an empty array.In a real-world scenario (for similar files structure) I receive a set of project-root globs, but I need to get files from specific section only (without modifying globs). That's why I need for negative pattern in ignore
The text was updated successfully, but these errors were encountered: