You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module #506
VS Code version: 1.19.1
Python Extension version: 0.9.1
Python Version: 3.6.4
OS and version: MacOS 0.13.2 - High Sierra
Actual behavior
Shows an error line 6 when line 6 is actually empty and even when I add newlines, the error is always on line 6. What I noticed was that if I commented out line6 in my .pylintrc file, the error moves to another line. And every single module I have would have the same error on the exact line.
Looks like pylint is linting .pylintrc which doesn't make sense and it doesn't make sense how an error in pylintrc(if there is one) show up in every single file in my project.
Expected behavior
There is no error on that line. It is an empty line and even when I move my code around by adding newlines. The error remains on that line.
Steps to reproduce:
pip install pylint - tried this with 1.8.1, with 1.5.5 same behaviour.
generate rcfile pylint --generate-rc-file
specify rcfile for the extension
Please note that running pylint in the terminal shows no errors.
Using config file /Users/ope/Documents/code/Projects/SameGame/.pylintrc
--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)```
Logs
Output from Python output panel
Using config file /Users/ope/Documents/code/Projects/SameGame/.pylintrc
************* Module .pylintrc
6,0,error,E0001:invalid syntax (<string>, line 6)
Output from Console window (Help->Developer Tools menu)
console.ts:123 [Extension Host] (node:36260) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
##Notice that the error line corresponds to the rcfile. Once I comment that line, the error line changes.
changed the title [-]pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module[/-][+]Pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module[/+]on Jan 1, 2018
Have you tried deleting the line from your pylintrc file? There might be some whitespace formatting at the line ending or something that is throwing Pylint off.
Activity
[-]pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module[/-][+]Pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module[/+]brettcannon commentedon Jan 2, 2018
Have you tried deleting the line from your
pylintrcfile? There might be some whitespace formatting at the line ending or something that is throwing Pylint off.opethe1st commentedon Jan 4, 2018
yes, I have, the error persists. I deleted it just now and it is effectively the same as commenting out the line which I did above too.
DonJayamanne commentedon Jan 22, 2018
Please could you upload the sample repo, so we could try that out at this end.
opethe1st commentedon Jan 24, 2018
I pushed all the relevant files i can think of - up to this branch - https://github.com/opethe1st/SameGame/tree/pylint-bug
opethe1st commentedon Jan 24, 2018
actually - a better example is this https://github.com/opethe1st/demo . just a print statement, and .pylintrc and the error is still there.
DonJayamanne commentedon Jan 24, 2018
Here's the fix to the settings.json (please remove the
=after--rcfile:Thanks for the sample, was able to replicate this and identify the simple issue.
opethe1st commentedon Jan 25, 2018
thanks, won't have guessed