Pre-commit: No hook with id `gitlint`
See original GitHub issueInstalled gitlint with pre-commit following the doc, and it doesn’t work.
(py37) ➜ workspace git:(develop) ✗ git commit -m 'testlkasdklnalgklkwamglamweoingienibgblalsjkdlgjldjlgasdgfasdfasdfasdgwebbffsdfsdnsdfsgwrqwrqwr'
autopep8.................................................................Passed
Check for added large files..............................................Passed
Check JSON...............................................................Passed
Check for merge conflicts................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Flake8...................................................................Passed
Fix requirements.txt.....................................................Passed
Don't commit to branch...................................................Passed
Trim Trailing Whitespace.................................................Passed
[develop (root-commit) 8ae7eec] testlkasdklnalgklkwamglamweoingienibgblalsjkdlgjldjlgasdgfasdfasdfasdgwebbffsdfsdnsdfsgwrqwrqwr
17 files changed, 825 insertions(+)
When run pre-commit run gitlint
, I got:
No hook with id `gitlint`
Here is my .pre-commit-config.yaml
:
repos:
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.4
hooks:
- id: autopep8
args:
- --in-place
- --ignore=E501
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: check-added-large-files
- id: check-json
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: flake8
args:
- --extend-ignore=E501
- id: requirements-txt-fixer
files: requirements*
- id: no-commit-to-branch
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/jorisroovers/gitlint
rev: master
hooks:
- id: gitlint
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
Setting up gitlint pre-commit local for a repository
- hook id: gitlint - exit code: 253 Usage: gitlint [OPTIONS] COMMAND [ARGS]... Try 'gitlint --help' for help. Error: No such command '.pre-...
Read more >pre-commit hook fails when adding args · Issue #109 - GitHub
I've set up my .pre-commit-config.yml like this: default_stages: [commit ... hooks: - id: gitlint stages: [commit-msg] args: [--contrib=CT1].
Read more >Supported hooks - pre-commit
github.com/pre-commit/pre-commit-hooks. check-added-large-files - prevents giant files from being committed. check-ast - simply checks whether the files ...
Read more >Gitlint - Joris Roovers
When no COMMAND is specified, gitlint defaults to 'gitlint lint'. Using gitlint as a commit-msg hook. Introduced in gitlint v0.4.0. You can also...
Read more >Available Hooks
Below is a comprehensive list with all hooks from {precommit} as well as their ... Some hooks will fail without changing the files...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@retr0h to avoid the pb, you need to set the top-level property
default_changes
to whatever stages your want to, probably thecommit
stage:Or you could set for each hook the specific stage you want it to be installed in.
@asottile : done 😜