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?
You could do that using the
g:ale_echo_msg_formatoption. For example, setting this option in the vimrc as shown below, would give you the desired result:Where
codeis 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:Note
missing-docstringinstead of the codeF0001. 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.