question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pylint message template overridden by linter

See original GitHub issue

Environment data

VS Code version: 1.18.1 Python Extension version: 0.8.0 Python Version: 3.6.3 OS and version: Fedora 26

Actual behavior

I was trying to set the --msg-template argument in python.linting.pylintArgs, but found that there were, surprisingly, no changes in the VS Code linter pop-ups or console output.

Oluwafemi Sule pointed out in his answer to my StackOverflow question that the message template is actually hardcoded into the linter for Pylint.

Expected behavior

I would have expected that passing in a --msg-template argument would have allowed me to change the format of the Pylint messages in the linter.

As a side note, it appears the Pylint project favors using the message symbol (e.g. ‘trailing-whitespace’) over the message msg_id (e.g. ‘C0303’) that is currently used in Visual Studio Code, per the examples in its documentation its default message template since pylint 1.0, and this FAQ answer.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
DonJayamannecommented, Dec 11, 2017

We could improve the linter message to include the message symbol (e.g. ‘trailing-whitespace’)

2reactions
brettcannoncommented, Dec 13, 2017

I think it’s a reasonable idea to include the human-readable message since Pylint has been slowly shifting that way itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change pylint message template in VS Code linter?
The message template argument is explicitly overridden. The purpose for this is to keep a consistent API for the result of every specific...
Read more >
Pylint output - Pylint 2.16.0-dev documentation
If both --output-format and --msg-template are specified, ... The evaluation formula can be overridden with the --evaluation=<python_expression> option.
Read more >
Linting Python in Visual Studio Code
The Python Extension Template makes it easy to integrate new Python tools into VS Code. To select a different linter, use the Python:...
Read more >
Pylint Documentation - Read the Docs
from pylint import epylint as lint ... --msg-template=<template> Modify text output message template. ... Overrides class-naming- style.
Read more >
Ubuntu Manpage: pylint - python code static checker
[default: yes] --exit-zero Always return a 0 (non-error) status code, even if lint errors are found. This is primarily useful in continuous integration...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found