atom-editorpylintpylintrc

How to ignore a specific Pylint message in Atom Editor?


I am using the Pylint linter package in atom on Windows when ever i use tab indentation it gives me the following error:

W0311 Bad indentation Found 1 spaces, Expected 4.

even though atom is using a 'tab' (tab type is hard)

I created a .pylintrc Pylint configuration file using :

pylint --generate-rcfile > .pylintrc

and added

--disable=W0311

under the [message control] section.

Also in the settings of the atom package i entered the location of the RC config file. I restarted atom and it's still producing the error message W0311 on every line.

How can I get rid of this message?


Solution

  • You could always disable specific messages using this template in the first line (top line) of your code:

    #pylint: disable=<error_name/number>,..,..

    In your example you could use:

    #pylint: disable=W0311

    Pylint recognizes this format and disables this message, so when you run Pylint it should not check for this error.