-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
How to exclude all directories except one? #1758
Comments
Are you asking about command line or configuration? Command LineExclude them: cspell --exclude "de_DE/**" --exclude "el_GR/**" "**" Include Only cspell "en_US/**" ConfigurationThere are three places that impact which files are checked:
You can also use Needed dictionaries: Example: "import": [
"@cspell/dict-de-de/cspell-ext.json",
"@cspell/dict-el/cspell-ext.json"
],
"overrides": [
{
"filename": "**/de_DE/**",
"language": "en,de"
},
{
"filename": "**/el_GR/**",
"language": "en,el"
}
]
|
I'm talking about configuration. Let me explain a little bit more about my issue.
I want to exclude all files from the files:
- I10n/en_US/**
ignorePaths:
- I10n/*** I'm right? |
After writing the response, I realized you might be trying to do the following: ignorePaths:
- "docs/**"
- "!docs/en_US/**" That is not supported by the glob library. See: Does not match for negative ignore · Issue #409 · isaacs/node-glob. |
Using files:
- I10n/**
overrides:
- filename: I10n/**
enable: false
- filename: I10n/en_US/**
enable: true |
Thanks! I will try it. |
Note: overrides are applied in order. So, reversing the order of the overrides will not work. |
This also works: files:
- I10n/**
overrides:
- filename:
- I10n/**
- '!I10n/en_US/**'
enable: false |
Is the |
No it isn't. |
I'm going to close this for now. If something is not working as you expect, please feel free to create a new issue and refer to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I have a directory with bunch of translation files like
I want to exclude all files except
en_US
. Of course I can specify them all inignorePaths
section, but can I do it better?The text was updated successfully, but these errors were encountered: