-
Notifications
You must be signed in to change notification settings - Fork 45
Files not being excluded via Atom, but command line flake8 does #454
Comments
I was going to comment that |
Pass the filename as the argument "stdin-display-name". Change the working directory where flask8 is executed to the same directory as the configuration file. This ensures that relative patterns defined in the configuration file work properly. Add test. This commit implements AtomLinter#454
Pass the filename as the argument "stdin-display-name". Change the working directory where flask8 is executed to the same directory as the configuration file. This ensures that relative patterns defined in the configuration file work properly. Add test. This commit implements AtomLinter#454 Add message asking to update Flake8 Add message asking to update Flake8 when an exception occurs since some errors may arise from using an outdated version. Fix eslint compliance. Fix test failling. Move fixtures using a config file to its own directory so the configuration file does not change the default values expected by the other tests.
Pass the filename as the argument "stdin-display-name". Change the working directory where flask8 is executed to the same directory as the configuration file. This ensures that relative patterns defined in the configuration file work properly. Add test. This commit implements AtomLinter#454
Pass the filename as the argument "stdin-display-name". Change the working directory where flask8 is executed to the same directory as the configuration file. This ensures that relative patterns defined in the configuration file work properly. Add test. This commit implements AtomLinter#454
Ping on this? |
v2.3.0 should fix this, let us know if it doesn't 😉. |
@Arcanemagus I'm on 2.3.0 and still seeing this issue. |
I am looking into this. |
Currently, the linter executes Flake8 inside of the project's root directory and it expects the configuration file to be located there. By project's root, I mean the topmost directory of the project according to Atom. In the example provided by the OP, the files are correctly ignored. However, in any other situation where the configuration file is not in the project's root, Flake8 does not recognize the file. @Arcanemagus I am not sure what the best approach would be. How the other linters solve this kind of issue? Should we try to locate the nearest configuration file and execute Flake8 inside that directory? |
@lucasdf I can reproduce this with my config in the root of my project. I use a |
@lucasdf Ideally these providers should be "the same as running the tool in the CLI", unfortunately what that actually means can get really tricky. I generally follow the rules of:
Which one of those a provider falls under is just the start of the trickiness 😉. I think this provider should follow the second one, unless this issue is describing a situation where that doesn't match what running |
This is the
setup.cfg
file. I know that the linter reads the file becauseignore
is honored so there's something going on with theexclude
. The first screenshot shows the linter raising an error inapollo/config/settings/local.py
while the second screenshot clearly shows that this file was ignored. Let me know what additional info is needed.Using Mac OS, virtualenvwrapper
Location of
flake8
:~/Developer/.virtualenvs/apollo/bin/flake8
Project structure
Screenshots
The text was updated successfully, but these errors were encountered: