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

💡: Add .pre-commit-hooks.yaml to enable cspell to be used directly with pre-commit #621

Open
1 task done
abrahan-munro opened this issue Jan 21, 2025 · 1 comment
Open
1 task done
Labels
enhancement New feature or request

Comments

@abrahan-munro
Copy link

abrahan-munro commented Jan 21, 2025

Problem

CSpell can be manually installed and set up as a local pre-commit hook (https://www.npmjs.com/package/cspell#git-commit-hooks, https://pre-commit.com/#repository-local-hooks).

Solution

But by adding an appropriate .pre-commit-hooks.yaml to the repo (https://pre-commit.com/#creating-new-hooks) it could be used in the usual way without installing (https://pre-commit.com/#2-add-a-pre-commit-configuration).

Alternatives

This seems to already be supported with cspell-cli, but it appears that won't use the vscode workspace dictionary and configuration: https://github.com/streetsidesoftware/cspell-cli#setup-pre-commit-hook

Additional Context

See the expired issue where this was previously requested, and attempted in a fork: streetsidesoftware/cspell#56.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@abrahan-munro abrahan-munro added the enhancement New feature or request label Jan 21, 2025
@Jason3S Jason3S transferred this issue from streetsidesoftware/cspell Jan 21, 2025
@Jason3S
Copy link
Contributor

Jason3S commented Jan 21, 2025

@abrahan-munro,

Adding pre-commit-hooks.yaml to the CSpell monorepo doesn't work. It was tried and failed. I could go into the reasons why it doesn't work, but that is not the point here. The cspell-cli repo was created to address the issues of setting up pre-commit.

I guessing you were hoping it would fix another issue. Please be clear about that issue. What are you hoping for?

This seems to already be supported with cspell-cli, but it appears that won't use the vscode workspace dictionary and configuration: https://github.com/streetsidesoftware/cspell-cli#setup-pre-commit-hook

Some more details are required. What do you want it to do that it is not doing?

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

No branches or pull requests

2 participants