Skip to content

Pylint - it appears pylint is linting the pylintrc file and throwing errors that affect every other module #506

@opethe1st

Description

@opethe1st

Environment 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.

screen shot 2018-01-01 at 12 52 54

screen shot 2018-01-01 at 12 54 12

##Notice that the error line corresponds to the rcfile. Once I comment that line, the error line changes.

screen shot 2018-01-01 at 12 57 45

screen shot 2018-01-01 at 13 01 17

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions