-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Does not respect exclude if excluded file is passed as parameter #53
Comments
In GitLab by @sigmavirus24 on Oct 31, 2014, 08:13 This is intentional. Some people want to forcibly check a file that is otherwise excluded. This would be a bug if you instead ran:
|
In GitLab by @cabello on Oct 31, 2014, 09:45 Is there an alternative besides applying the exclusion policy myself? I am getting the list of files from bash in a commit hook: |
In GitLab by @sigmavirus24 on Oct 31, 2014, 10:12 Why aren't you using flake8's commit hook. I'm pretty sure it already handles this. |
In GitLab by @cabello on Oct 31, 2014, 13:18 I managed to make it working following your suggestion, instead of checking for files, I am checking for the changed folders, worked out nicely. I am not sure why we are not using flake8 built-in commit hook though. =/ Thanks for the quick and prompt reply & help! |
In GitLab by @sigmavirus24 on Nov 1, 2014, 18:18 Always happy to help @cabello ! Thanks for reporting this anyway |
In GitLab by @dwaynebailey on Apr 28, 2016, 19:52 I'm using If I supply --config to override any default config I really don't expect it to behave differently regardless of what I supply. If I supply dir/ it respects it, if I supply dir/file.py it doesn't. It's also selectively takes configuration from my setup.cfg:
I'm sure there's a more logical way to say ignore my settings? Current behaviour is full settings for dir/ or default, half settings for specified file.py. Pretty confusing tbh. In the interest of those who come after. This pre-commit issue suggests some workarounds. |
In GitLab by @sigmavirus24 on Apr 29, 2016, 05:46 Hi @dwaynebailey, At the present time, all configuration file discovery, parsing, and management is handled by pycodestyle (formerly pep8). Flake8 3.0 has taken control of this aspect and now handles this on its own and has fixed the problem I think you are describing (where you expect |
In GitLab by @davecremins on Dec 15, 2016, 06:29 This should not have been closed, this is still an issue in flake8 3.0.4 |
In GitLab by @thejcannon on Jan 31, 2020, 09:34 Has any thought been given to "solving" this issue in the same way It's truly unfortunate to have to specify the exclusions in more than one place: The config file ( |
In GitLab by @asottile on Jan 31, 2020, 09:36 afaict this got "fixed" at some point: [flake8]
exclude = t.py import os $ flake8 t.py
$ though I suspect it was on accident |
In GitLab by @thejcannon on Jan 31, 2020, 09:54 Looks like that behavior is documented in issue 392, and the "bug" (un)fortunately doesn't apply to exclusion directories, just exclusion filenames. In my use case, there are several files in the directory, so I'm still out of luck 🤷 |
In GitLab by @cabello on Oct 31, 2014, 08:01
If I run:
And my flake8-hook.ini contains:
Flake ignores the passed configuration and lints the file passed as parameter.
The text was updated successfully, but these errors were encountered: