Pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module
See original GitHub issueEnvironment data
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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
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.
Please could you upload the sample repo, so we could try that out at this end.