Skip to content
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

Exclude option is ignored #52

Closed
daviddavis opened this issue Jul 14, 2017 · 3 comments
Closed

Exclude option is ignored #52

daviddavis opened this issue Jul 14, 2017 · 3 comments

Comments

@daviddavis
Copy link
Contributor

daviddavis commented Jul 14, 2017

It looks like the exclude option in .pep8speaks.yml is being ignored.

I have an example repository set up:

https://github.com/daviddavis/pep8speaks-exclude

You can see that I am excluding the docs directory:

https://github.com/daviddavis/pep8speaks-exclude/blob/master/.pep8speaks.yml#L7

However, on PRs, pep8speaks still shows errors for files in the excluded directory:

daviddavis/pep8speaks-exclude#2

Running pycodestyle locally with --exclude works:

$ pycodestyle --max-line-length 100 .
./docs/conf.py:1:1: E265 block comment should start with '# '
./docs/conf.py:3:1: E265 block comment should start with '# '
$ pycodestyle --max-line-length 100 --exclude docs .
$

Not sure if I doing something wrong? I also tried a string instead of an array (ie exclude: docs) but that didn't work either.

@daviddavis daviddavis changed the title Exclude option is not being honored Exclude option is ignored Jul 14, 2017
@daviddavis
Copy link
Contributor Author

daviddavis commented Jul 14, 2017

It looks like the problem is that pep8speaks is just running pycodestyle on a file file_to_check.py so excludes never matches anything. We need to filter the files before this point. Opening a PR #53.

@OrkoHunter
Copy link
Collaborator

Hi @daviddavis !

It looks like filename_match needed more tweaks than the fnmatch. I have added them in this commit. Can you please verify it?

@daviddavis
Copy link
Contributor Author

daviddavis commented Jul 18, 2017

@OrkoHunter looks good and works well! 👍

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants