Anyone know how to show pylint message code in the problem section?
It only shows descriptions, not the codes like F821 and E0601.
Anyone know how to show pylint message code in the problem section?
It only shows descriptions, not the codes like F821 and E0601.
Unfortunately, VS Code has hardcoded the pylint --msg-template
argument as:
--msg-template='{line},{column},{category},{symbol}:{msg}'
and cannot be configured. You can view the VS Code source code for this.
For more info, see How to change pylint message template in VS Code linter?
Pylint is a Python static code analysis tool that can find programming errors, help implement coding standards, and provide simple refactoring suggestions.
It usually does not display the code containing the error on the terminal, but displays the type and suggestion of the error, and displays the precise location of the error code in the terminal with numbers. (For example: [49,7], line 49, 7th)
For "print(jfile)
", Pylint can only recognize that "jfile" is an undefined variable. The error here is that it needs to be defined.
For "jfile = "hello" print jfile
", Pylint will recognize that "jfile" is a string. The error here is that it needs to use "print(jfile)
" to output using python3: ("pylint" will give code output suggestions here)