Add system hook#2
Conversation
|
@koalaman @taoufik07 Would be nice to have something like this merged. I'm not sure whether the $VERSION in the description works in this case though. As long as I pass a valid git tag to |
|
I'm also interested in this feature --- docker isn't always available for various reasons and being able to route around that requirement would be helpful. |
|
the "template" is updated but the in the mean time, I'm using my fork: |
|
FYI we found that using pre-commit hooks via Nix is more robust than the default |
|
@koalaman Do you have any concerns about this pull request? This would be extremely useful -- I have an older system and don't have Docker as I need to keep things lightweight. |
|
ChatGPT wrote this precommit config ( repos:
- repo: local
hooks:
- id: shellcheck
name: shellcheck
entry: shellcheck
language: system
files: \.sh$It works! Plus I can see colors (which disappear when I run shellcheck through Docker). |
Thanks @atsaloli , that was helpful! To cover more shell scripts that might not have the extension Note that some shells like
@koalaman this MR has been pending for almost a year, it would be a helpful feature to merge if you could please look into it ? Thanks |
|
pre-commit have supported haskell hooks. https://pre-commit.com/#haskell I think a haskell hook will be better? Related issue: koalaman/shellcheck#2909 |
|
I usually use the following system hook of shellcheck: - repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: shellcheck
exclude_types:
- zshRelated PR: koalaman/shellcheck#2925 |
|
Hey, am I understanding it right that this just invokes whichever version of ShellCheck the user already has installed, if any? |
Yes, if user don't installed shellcheck, it will failed. |
|
I see. If it ignores the specified shellcheck version and just runs whatever the user has, then my understanding is that it would be better off as a |
… and adjust exclusions like discussed in koalaman/shellcheck-precommit#2, #217, #232.
I hope you don't mind opening the PR without first opening an issue