Skip to content

Duplicated or even bugged result if launching pylint on the same file multiple time #4053

Closed
@kayhayen

Description

@kayhayen

I have a mode for calling pylint on only the changed files from git, and I was giving it the staged changes and the unstages changes, causing sometimes files to duplicate. More than once, this has caused too many branches to be reported on files, where if the file is only given once, this is not happening, and it's a false alarm.

Steps to reproduce

  1. using pylint on the same file names, e.g. with code barely below tresholds

Current behavior

False alarms are given

Expected behavior

I think that pylint should recognize, probably through making it absolute paths, if files are really the same, and then only work on one of them, or report on both files separately. Right now it seems as though the source of 2 files gets assigned to one target internally.

pylint --version output

pylint 2.6.0
astroid 2.4.2
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]

It's happening everywhere as far as I can tell.

Yours,
Kay

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🪲False Positive 🦟A message is emitted but nothing is wrong with the codeHigh effort 🏋Difficult solution or problem to solveNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions