Skip to content

Pylint is ignoring the ignore-paths instruction from .pylintrc #7108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tanogedler opened this issue Jul 1, 2022 · 1 comment
Closed

Pylint is ignoring the ignore-paths instruction from .pylintrc #7108

tanogedler opened this issue Jul 1, 2022 · 1 comment
Labels
Duplicate 🐫 Duplicate of an already existing issue

Comments

@tanogedler
Copy link

tanogedler commented Jul 1, 2022

Bug description

After the last release of Pylint, to version 2.14.4, Pylint is not recognizing properly the ignore-paths instruction from .pylintrc

It works fine from the command line.

I tested with the previous version 2.14.3 and it worked both in the command line and from .pylintrc

Configuration

[MASTER]
ignore-paths=^.*/\.ignore_dir

This is part of my pyproject.toml file

[tool.poetry.dependencies]
python = "^3.9"
numpy = "^1.22.3"

[tool.poetry.dev-dependencies]
pylint = "2.14.4"




### Command used

```shell
poetry run pylint --recursive=y .

Pylint output

************* Module file_to_be_ignored
.ignore_dir/file_to_be_ignored.py:13:4: E0001: invalid syntax (<unknown>, line 13) (syntax-error)

------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)

Expected behavior

poetry run pylint --recursive=y --ignore-paths .ignore_dir/ .


Your code has been rated at 10.00/10 (previous run: 0.00/10, +10.00)

Pylint version

pylint 2.14.4
astroid 2.6.6
Python 3.9.12 (main, Apr  5 2022, 06:56:58) 
[GCC 7.5.0]

OS / Environment

Ubuntu 22.04

Additional dependencies

No response

@tanogedler tanogedler added the Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling label Jul 1, 2022
@DanielNoord
Copy link
Collaborator

Closing as duplicate of #5398. We welcome any suggestions to allow both Windows as Unix paths as well as allowing \ to be used as escape character.

@DanielNoord DanielNoord closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2022
@DanielNoord DanielNoord added Duplicate 🐫 Duplicate of an already existing issue and removed Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate 🐫 Duplicate of an already existing issue
Projects
None yet
Development

No branches or pull requests

2 participants