Skip to content
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

pylint extension should handle python.linting.ignorePatterns setting. #199

Closed
Mutantpenguin opened this issue Oct 7, 2022 · 7 comments · Fixed by #415
Closed

pylint extension should handle python.linting.ignorePatterns setting. #199

Mutantpenguin opened this issue Oct 7, 2022 · 7 comments · Fixed by #415
Labels
feature-request Request for new features or functionality needs community feedback

Comments

@Mutantpenguin
Copy link
Contributor

Although I have multiple patterns that work (as can be seen by them working for mypy and pycodestyle), this extension just ignores this.

example:

"python.linting.ignorePatterns": [
	"**/site-packages/**/*.py",
	".vscode/*.py",
	"frappe/**/*.py",
	"erpnext/**/*.py"
],

If I disable this extension and set python.linting.pylintEnabled to true to use pylint from my system, these pattern are used correctly.

Version of my local pylint: 2.15.3
Version of this extension: v2022.4.0

This wouldn't be so bad if the bundled pylint would honor the command line arg --ignore-paths, but it just does nothing with it.

But honoring python.linting.ignorePatterns would be the better solution in my opinion.

@github-actions github-actions bot added the triage-needed Issue is not triaged. label Oct 7, 2022
@karthiknadig
Copy link
Member

The bundled pylint no honoring --ignore-paths is due to a bug in pylint itself see for more details #169

Honoring python.linting.ignorePatterns would be a feature request.

@karthiknadig karthiknadig added feature-request Request for new features or functionality needs community feedback and removed triage-needed Issue is not triaged. labels Oct 7, 2022
@karthiknadig karthiknadig changed the title python.linting.ignorePatterns is ignored pylint extension should handle python.linting.ignorePatterns setting. Oct 7, 2022
@karthiknadig karthiknadig changed the title pylint extension should handle python.linting.ignorePatterns setting. pylint extension should handle python.linting.ignorePatterns setting. Oct 7, 2022
@Mutantpenguin
Copy link
Contributor Author

The bundled pylint no honoring --ignore-paths is due to a bug in pylint itself see for more details #169

Honoring python.linting.ignorePatterns would be a feature request.

Thanks for the explanation. The bug seems to be fixed in pylint already and is already released so I guess vscode-pylint will include this in its next version?

@karthiknadig
Copy link
Member

@Mutantpenguin Can you try the pre-release version? 2022.5.12781100

@Mutantpenguin
Copy link
Contributor Author

Works!

But I would still say that integrating it with python.linting.ignorePatterns is a better long term solution and would like this feature request to stay open.

@brccabral
Copy link

Hi,
How do I pass multiple paths to this --ignore-paths?

@SpaceIm
Copy link

SpaceIm commented Sep 4, 2023

I've tried ignore-paths in my .pylintrc (or pyproject.toml), and even --ignore-paths in pylint.args of my settings.json, and it doesn't work (without or with overriding pylint.interpreter & pylint.path), while it works fine if I run my own pylint (installed in my venv) in command line, even with --from-stdin.

My pattern is ^foo/.*.py$.

@karthiknadig
Copy link
Member

@SpaceIm Can you share the command you ran with --from-stdin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality needs community feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants