-
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
Support pylama for python #2266
Conversation
Just to clarify, a "Traceback" message is a possible flaw in the linter itself and not something like a syntax error? |
A traceback is printed whenever a linter plugin encounters an unhandled exception. (See pylama/core.py:85-87) The unhandled exception could be due to an unexpected internal error or a syntax error severe enough that the linter plugin can't analyze the file. For example, the pydocstyle plugin throws Does that answer your question? |
If this is a common case, I think there should be a better way to solve it than hide the message behind |
I expect it to be about as frequent as |
[pylama] is a popular (>500 stars) plugin-based code audit tool for Python which includes plugins for several popular tools. The pylama ALE linter is based on existing python linters and attempts to adopt the same conventions and code where possible. [pylama]: https://github.com/klen/pylama Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Several linters may output traceback messages. Consolidate the parsing of the traceback into an ale#python#HandleTraceback function which can be shared between linters and includes the exception message in the ALE message text instead of a generic message. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
I updated the pull request with an additional commit that consolidates the traceback parsing between the Python linters and uses the exception line (with the type and message) as the ALE text. Let me know what you think. |
- Handle eradicate (E800) messages which have a colon after the code. - Test isort messages, which don't have a code. - Ignore C0103 for module names resulting from the temporary directory not complying with the pylint module name restrictions (module-rgx), but do not ignore other C0103 messages (bad names from other names). Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Cheers! 🍻 |
Thanks @w0rp! 🥂 |
pylama is a popular (>500 stars) plugin-based code audit tool for Python which includes plugins for several other popular tools.
The pylama ALE linter is based on existing python linters and attempts to adopt the same conventions and code as much as possible.
Thanks for considering,
Kevin