-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add pylint formatter #151
Add pylint formatter #151
Conversation
call ale#linter#Define('python', { | ||
\ 'name': 'pylint', | ||
\ 'executable': 'pylint', | ||
\ 'command': 'pylint --output-format text --msg-template="{path}:{line}:{column}: {msg_id} {msg}" --reports n %s', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a problem here. I think you're formatting in the filename, which means that the linter is running on the version of the file on disk, but not on the contents of the current buffer. You should try using ale#util#stdin_wrapper
, which is used in some other linters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I was wondering why many linters were using stdin. I will update this. I don't think we should need the wrapper here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes we do, looking into this now.
This customizes the output format of pylint in order to use the same pep8 parser
I've updated this to use the stdin wrapper. One problem I had while doing that was temp files with |
Cool, I'll take this and add it to the README and help file after I look at some other pull requests. |
Awesome, thank you! |
Would it be possible to add an args callback like exists for flake8 to allow for disabling certain warnings, etc...? |
Yeah, you can open an issue for that and I or someone else will look at it eventually. |
This customizes the output format of pylint in order to use the same
pep8 parser
One thing to note here, pylint likes to output lots of comments or warnings, both of which use
--
in the gutter. There's a possibility we'd prefer the warnings to be displayed with>>
, but I'll leave that up for debate here.