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

Improve cspell pre-commit hook output #56

Merged
merged 2 commits into from
Sep 24, 2021
Merged

Improve cspell pre-commit hook output #56

merged 2 commits into from
Sep 24, 2021

Conversation

redeboer
Copy link
Contributor

Hey there, thanks a lot for extracting this repo from cspell! Now it's much easier to run cspell through pre-commit. (Previously did that through this mirror, which I'll archive.)

Here's a suggested change to the hook config, so that it's easier to read the pre-commit output (particularly when running over all files). Pre-commit users can of course configure this themselves through their own .pre-commit-config.yaml, but I think this should become the default behaviour.


Intended behaviour is shown below. Can be reproduced with:

pre-commit try-repo . --all-files
b07cfd1: no verbose

Old (v5.6.7)

image

New

image

7615279: no progress

Old (v5.6.7 / b07cfd1)

image

New

image

When a pre-commit passes, you don't want to see output other than
"Passed"
cspell-cli progress clutters the pre-commit output when errors are
found
@redeboer redeboer changed the title Pre commit output Improve cspell pre-commit hook output Sep 23, 2021
@redeboer
Copy link
Contributor Author

7615279: no progress

Old (v5.6.7 / b07cfd1)

image

New

image

In addition, is there a way to tell cspell-cli not to print this "Files checked" line?

@Jason3S
Copy link
Contributor

Jason3S commented Sep 23, 2021

@redeboer,

Thank you for the PR.

Did you try? --no-summary

To get more options: npx cspell-cli lint --help

@Jason3S Jason3S merged commit 23d98fb into streetsidesoftware:main Sep 24, 2021
@redeboer redeboer deleted the pre-commit-output branch September 24, 2021 06:45
@Kurt-von-Laven
Copy link
Contributor

I intend to add documentation on the available command line options to the README, but in the meantime, I've pasted them into #54.

@redeboer
Copy link
Contributor Author

Did you try? --no-summary

Ah thanks yes, and I see this has been addressed in #57

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

Successfully merging this pull request may close these issues.

None yet

3 participants