Reputation: 1107
in my vimrc
file, I add this line:
let g:ale_python_pylint_options = '--rcfile ~/.pylintrc'
And in my ~/.pylintrc
file, I have this line:
msg-template={msg_id}: {msg}
However, with my vim ale plugin, the error message showed does not include the mssage id.
The message is like this:
[Pylint] Unused variable 'j' [W]
But I hope I could get this: [Pylint] [W0612] Unused variable 'j' [W]
How could I make it work?
Upvotes: 3
Views: 1225
Reputation: 1441
You could do that using the g:ale_echo_msg_format
option. For example, setting this option in the vimrc as shown below, would give you the desired result:
let g:ale_echo_msg_format='[%linter%] [%severity%] %code% %s'
Where code
is the error code. However, this code outputted is a human-readable code instead of the actual code. For the above an example output is as follows:
[pylint] [Warning] missing-docstring Missing module docstring
Note missing-docstring
instead of the code F0001
. On reading through the issues, the author of ale is deliberately doing this, So, if you need the actual error code, you're out of luck. Open an issue in the project and hope the author changes this behavior.
Upvotes: 2