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

Patterns in Git ignore do not improve the scanning performance unlike direct ignorePaths #3047

Open
2 tasks done
aminya opened this issue Jun 13, 2022 · 0 comments
Open
2 tasks done
Labels

Comments

@aminya
Copy link
Contributor

aminya commented Jun 13, 2022

Info

Kind of Issue

  • runtime - command-line tools

Which Tool or library

  • cspell -- the command-line spelling tool

Which Version

Version: 6.1.2

version: 11

OS version if applicable.

Bug Description

Describe the bug

The patterns in gitignore do not improve the scanning performance unlike the patterns in ignorePaths. I used to use gitignore for storing all my ignored paths, but I realized that is only applied in the last step. I think the issue is with the globbing functionality. All the ignore patterns should be concatenated before starting the scan.

cspell.config.yaml

files:
  - "**"
useGitignore: true
# ignorePaths:
#    - "**/node_modules/"   # if you enable this, the performance is increased significantly 

and this in gitignore:

node_modules/

I also noticed that **/* is slower than **

To Reproduce

Steps to reproduce the behavior:

cspell lint --no-progress --show-suggestions --cache --cache-location ./.cache/cspell/.cspellcache

Expected behavior

gitignore patterns should work like ignorePaths

Screenshots

Additional context

cspell.json

See the above

Example Repository (Optional)

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