-e/--exclude doesn't work with pre-commit
See original GitHub issueEnvironment
interrogateversion: 1.3.1- Operating System(s): Windows
- Python version(s): 3.7.7
Description of the bug
Using the -e/--exclude argument works perfectly fine when using interrogate directly on the command line. However, when I pass it in my .pre-commit-config.yaml file like so:
- repo: https://github.com/econchick/interrogate
rev: 1.3.1 # or master if you're bold
hooks:
- id: interrogate
args: [--exclude=tests, --fail-under=100]
The argument doesn’t seem to take effect. So far, I have resulted to using --ignore-regex which does work and achieves the same goal. Still, strange that --exclude doesn’t seem to work. Maybe I am doing something wrong?
What you expected to happen
I expected --exclude to work using pre-commit.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Pre-commit-hook ignores exclude patterns · Issue #395 - GitHub
My team wants to try black as a pre-commit hook on a provisional basis, so we run it only on files in one...
Read more >Exclude some files on running black using pre-commit
pre -commit finds all the python files, then applies pre-commit 's exclusion, and then passes that list of files to the underlying tools...
Read more >pre-commit
Run pre-commit install to install pre-commit into your git hooks. pre-commit will now run on every commit. Every time you clone a project...
Read more >Exclude vendor folder from Before Commit hooks : GO-11245
The "Before Commit" actions selected in Settings -> Version Control -> Commit run only on own code and exclude packages in the vendor...
Read more >Pre-commit - Made With ML
It is highly not recommended to skip running any of the pre-commit hooks because they are there for a reason. But for some...
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
My solution is adding
pass_filenamesto the hookThat way
interrogateruns as if you were running it from CLI.Maybe this should be part of the defaults for the hook?
Seems like a reasonable expectation 😃 Thanks for the issue! I’ll try to set some time aside over the next week to look deeper into this.