1

I am trying to see only the pylint errors, but I am getting a lot of info-level messages instead, that doesn't matter at all (at least to me). The real problem is that it shows all of this non-critical info while the real critical errors are "hidden".

Here is a sample:

screenshot of Problems tab with all the pylint problems

Here is my current setting.json in VS Code:

{
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
}
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
ambigus9
  • 1,417
  • 3
  • 19
  • 37
  • 1
    "*only **critical** errors and warnings*" The issues are differentiated into levels (such as info, warning, and error) and into codes (such as W0109, E1101, etc.). See (see http://pylint-messages.wikidot.com/all-codes). There is no clear-cut setting to say "only show **critical** errors and warnings". You'll have to determine which ones are critical _for you_, then disable all but errors, and/or disable specific codes (ex. `--disable=W0142`). – Gino Mempin Dec 15 '21 at 00:25
  • Does this answer your question? [How to disable pylint warnings and messages on VS Code?](https://stackoverflow.com/q/63809051/2745495) – Gino Mempin Dec 15 '21 at 00:27
  • Wait. How can I add that flag? `--disable=W0142` – ambigus9 Dec 15 '21 at 00:34
  • Please check the links I posted in my previous comments. The answers there already describe how. – Gino Mempin Dec 15 '21 at 00:36
  • @GinoMempin please consider to add a similar answer like I posted to mark your answer as the correct one. Thanks. – ambigus9 Dec 15 '21 at 00:48
  • @GinoMempin I can't find the code for `Using an f-string that does not have any interpolated variables`. Any advice? – ambigus9 Dec 15 '21 at 00:57
  • Thanks for the offer, but similar to maintaining a codebase, since there is already an answer somewhere else that perfectly answers your question, I'd rather link to that instead and close this as a duplicate. Better to maintain the answer in 1 place. – Gino Mempin Dec 15 '21 at 01:25

1 Answers1

0

Thanks to @Gino Mempin to me the solution is like:

{
    "python.linting.pylintEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintArgs": [
        "--disable=C0116,C0301,C0303,C0325,W0311,W1202,W1201,W1203,W1309,W0702,C0103,C0415"
    ]
}

Where --disable=XXXX can be found in official docs: https://docs.pylint.org/en/latest/technical_reference/features.html

ambigus9
  • 1,417
  • 3
  • 19
  • 37