frans
frans

Reputation: 9808

Is it possible to run pylint with ignore of "# pylint: disable=" instructions?

In order to identify smelly code I'd like to run pylint as if there were no # pylint: disable=* instructions (e.g. pylint: disable=broad-except).

Is it possible to disable disable itself on command line?

Of course I could create a temporary file with all # pylint: disable instructions removed but maybe pylint is smart enough to have this built in..

Upvotes: 2

Views: 937

Answers (3)

sinoroc
sinoroc

Reputation: 22438

I believe one of the following could help:

  • pylint --enable=locally-disabled module.py
  • pylint --enable=suppressed-message module.py
  • pylint --enable=all module.py

Upvotes: 1

Jiří Baum
Jiří Baum

Reputation: 6940

You can get these by enabling suppressed-message

pylint --enable=suppressed-message

Upvotes: 2

Aryan
Aryan

Reputation: 1113

I dont how to disable pylint but i know how to override it's default settings, like this-

  1. In Your Working Directory create a file called .pylintrc
  2. Done!, For Example-
[FORMAT]
max-line-length=1000 -To override the default line length which is 100 

Upvotes: -2

Related Questions