leinardi / pylint-pycharm

A plugin providing both real-time and on-demand scanning of Python files with PyLint from within PyCharm/IDEA.
Apache License 2.0
196 stars 35 forks source link

Support setting a working directory for pylint #96

Open lrittel opened 1 year ago

lrittel commented 1 year ago

Firstly: thank you for creating the plugin!

Is your feature request related to a problem? Please describe.

I have run into a few problems with configuring pylint:

Running pylint from the root directory like pylint src/, I didn't encounter those issues.

Also, support for discovering a pyproject.toml in a parent directory is a feature that won't be available until pylint 3.0.0.

Always running pylint from a specific directory would also help with reproducing configuration issues on the command line and keeping the setup similar across different tools.

Describe the solution you'd like

One of two things (or a combination of both) in the settings:

Describe alternatives you've considered

I've tried to configure pylint 3.0.0a6 in a way that it uses my pyproject.toml from the project root, but I run into a problem with ignore paths not matching anymore.

I also considered creating a wrapper script, this would complicate my setup a lot.

lrittel commented 1 year ago

If I read https://github.com/leinardi/pylint-pycharm/blob/05d3546a3b49ceb4c0e59ab43a1e41b7c84a26a1/src/main/java/com/leinardi/pycharm/pylint/plapi/PylintRunner.java#L270 correctly, pylint should already be executed from the project directory?

That doesn't match the observed behavior for me. I'm confused now.