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

exit code 1 when when cspell is asked to check ignored filed #2594

Closed
13 tasks
ogiexela opened this issue Mar 18, 2022 · 3 comments
Closed
13 tasks

exit code 1 when when cspell is asked to check ignored filed #2594

ogiexela opened this issue Mar 18, 2022 · 3 comments

Comments

@ogiexela
Copy link

Info

Kind of Issue

  • [x ] runtime - command-line tools
  • building / compiling
  • security
  • change in behavior
  • [ x] crash / error

Which Tool or library

  • [ x] cspell -- the command-line spelling tool
  • cspell-tools -- used for building dictionary files
  • cspell-lib -- library that does the actual spell checking.
  • cspell-trie -- tool for working with trie files.

Which Version

Version: 5.18.5

Issue with supporting library?

  • [ x] No
  • cspell-glob -- library for matching glob patterns
  • cspell-io -- thin file i/o library
  • cspell-trie-lib - trie lib
  • cspell-trie2-lib - trie lib alternate format

OS:

  • Macos
  • [ x] Linux
  • Windows
  • Other

version:

OS version if applicable.

Bug Description

Describe the bug

Asking cspell to check an ignored fill results in exit code 1

NOTE: we have a git pre-commit hook which spell checks committed files so this causes a problem when the only changes are made to the files which are cspell ignored.

To Reproduce

Steps to reproduce the behavior:

  1. Add a file to ignorePaths in cspell config `ignorePaths: ["./foo.txt"]
  2. Ask cspell to check that ignored file cspell ./foo.txt
  3. See error

Result:

CSpell: Files checked: 0, Issues found: 0 in 0 files
error Command failed with exit code 1.

Expected behavior

cspell should exit with status code 0 since there were no spelling issues detected

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

cspell.json

If applicable, attach a copy of the cspell.json file.

Example Repository (Optional)

An example repository makes things easier to debug.

@ogiexela ogiexela changed the title exit code when when cspell is asked to check ignored filed exit code 1 when when cspell is asked to check ignored filed Mar 18, 2022
@Jason3S
Copy link
Collaborator

Jason3S commented Mar 18, 2022

@ogiexela,

Does --no-must-find-files work for you? See cspell lint --help.

Typical git commit hooks use the following options:
- --no-must-find-files
- --no-progress
- --no-summary
- --gitignore

@Jason3S
Copy link
Collaborator

Jason3S commented Mar 19, 2022

@ogiexela,

I'm going to close this. If there is still an issue, please re-open.

@Jason3S Jason3S closed this as completed Mar 19, 2022
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants