Skip to content
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

feat: Add support for .gitignore #1823

Merged
merged 3 commits into from
Oct 4, 2021
Merged

feat: Add support for .gitignore #1823

merged 3 commits into from
Oct 4, 2021

Conversation

Jason3S
Copy link
Collaborator

@Jason3S Jason3S commented Oct 4, 2021

Fix: #1319

On the command line:

  --gitignore                  Ignore files matching glob patterns found in .gitignore files.
  --gitignore-root <path>      Prevent searching for .gitignore files past root.

Config:

cspell.json

    /**
     * Tells the spell checker to load `.gitignore` files and skip files that match the globs in the `.gitignore` files found.
     * @default false
     */
    useGitignore?: boolean;

    /**
     * Tells the spell checker to searching for `.gitignore` files when it reaches a matching root.
     */
    gitignoreRoot?: FsPath | FsPath[];

Refactor reach command into its own file.
@Jason3S Jason3S merged commit 9b0dfe4 into main Oct 4, 2021
@Jason3S Jason3S deleted the dev-gitignore branch October 4, 2021 21:14
@capaj
Copy link

capaj commented Oct 4, 2021

Why was this added with default: false ?
IMHO majority of people only need cspell for files checked into git.

@Kurt-von-Laven
Copy link

I assume for backwards compatibility. Perhaps the default could be changed as part of the next major version release though?

@Jason3S
Copy link
Collaborator Author

Jason3S commented Oct 5, 2021

@capaj,

@Kurt-von-Laven is right, so I'll switch the default in the next major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider Parsing .gitignore
3 participants