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

support older flake8 output, still used by hacking module from openstack style guide #2215

Merged
merged 2 commits into from
Jan 27, 2019

Conversation

irwand
Copy link
Contributor

@irwand irwand commented Jan 16, 2019

hacking module link: https://github.com/openstack-dev/hacking
They install specific version of flake8 with some other plugins.

Our internal style guide uses hacking, which is based on older flake8. The output changed slightly, and the difference is whether there is a ':' after the error code. So I merely add ':?' to the pattern here to make it work with new flake8 or older version.

I added the test for it, and here's the vader output. As you can see, my new test (the last one on the list) works and I haven't screwed the other ones. So yay!

Starting Vader: 1 suite(s), 11 case(s)
Starting Vader: D:\github\ale\test\handler\test_flake8_handler.vader
( 1/11) [EXECUTE] The flake8 handler should handle basic warnings and syntax errors
( 2/11) [EXECUTE] The flake8 handler should set end column indexes for certain errors
( 3/11) [EXECUTE] The flake8 handler should handle stack traces
( 4/11) [EXECUTE] The flake8 handler should handle names with spaces
( 5/11) [EXECUTE] Warnings about trailing whitespace should be reported by default
( 6/11) [EXECUTE] Disabling trailing whitespace warnings should work
( 7/11) [EXECUTE] Warnings about trailing blank lines should be reported by default
( 8/11) [EXECUTE] Disabling trailing blank line warnings should work
( 9/11) [EXECUTE] F401 should be a warning
(10/11) [EXECUTE] E112 should be a syntax error
(11/11) [EXECUTE] Compatibility with hacking which uses older style flake8
Success/Total: 11/11
Success/Total: 11/11 (assertions: 11/11)
Elapsed time: 0.407332 sec.

Thanks for this plugin! It's been boosting my productivity!

@w0rp
Copy link
Member

w0rp commented Jan 21, 2019

Cheers! 🍻

@w0rp w0rp merged commit d882c43 into dense-analysis:master Jan 27, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants