Open tispratik opened 4 years ago
The issue is related to loading of pylintrc. When i remove the "/Users/pratik/Projects/main/python/pylintrc" path, then it works (but does not use my pylintrc, uses the default one)
After removing pylintrc path, it works.
My pylintrc contains the following line, which causes the issue. If i remove the below line, it works:
init-hook="from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))"
I have the same problem but even without pylintrc path set :( (IDEA 2020.1.2 Ultimate edition, Pylint plugin 0.12.2, Python plugin 201.78846.85)
Idea log just says:
2020-06-19 13:44:48,253 [1705284] INFO - di.pycharm.pylint.PylintPlugin - Scanning current file(s).
and finds nothing even though cmd line version does find some issues
FYI: when i set debug logging to PylintRunner, pylint during check seem to work:
2020-06-19 14:15:39,476 [3556507] DEBUG - harm.pylint.plapi.PylintRunner - Pylint path check output: :no-member (E1101): *%s %r has no %r member%s* Used when a variable is accessed for an unexistent member. This message belongs to the typecheck checker.
I'm experiencing the same issue where I just can't get pylint plugin to produce any output, but calling pylint from command line works.
I just switched from Windows to Linux and strangely the plugin works there (config sahred via VCS) and even works on friends macOS, so it seems like issue may be specific to Linux.
I'm not sure how to debug it since plugin produces no output (either success or error).
Removing .pylintrc from config doesn't help, hardcoding pylint path instead of plugin autodetecting it also doesn't change anything, so I'm kind of stuck. :/ I'm wondering if it may be a permission issue.
EDIT: It seems like that in PyCharm 2021.3 (EAP at the moment) this issue doesn't exist anymore, which makes me think it may be related to plugin missuing pylint from venv folder. In new version they enforce external tools to use venv, so maybe that solved it for plugins as well: https://youtrack.jetbrains.com/issue/PY-12988
I have been encountered this as well. In general I notice that most "outdated" config items or missing plugins will cause the plugin to "quietly fail" meaning it will just display "Pylint found no problems"
To replicate the issue add disable=no-init
The symptoms: in pylint commandline output:
************* Module <path>/pylintrc
pylintrc:1:0: R0022: Useless option value for '--disable', 'no-init' was removed from pylint, see https://github.com/PyCQA/pylint/issues/2409. (useless-option-value)
entry in the idea.log
:
2022-10-05 12:57:20,917 [9021467] INFO - #c.l.p.p.p.ProcessResultsThread - Could not find mapping for file: pylintrc in {<path redacted>/unit_tests/test_dvc_data_set.py=PyFile:test_dvc_data_set.py}
The workaround for me is to cleanup the config In long term this plugin need to detect this problem and report it instead of "quietly ignoring" it.
I get the same behaviour with the official example pylintrc https://github.com/PyCQA/pylint/blob/f860e3fe1c03be81e16732123a1e0cdb247db47f/examples/pylintrc
When scanning the file outside PyCharm and thus not with the plugin, multiple problems are shown, in my case no R*
problems, no "Useless option ..." ones.
I have a slight variation on this same issue. PyCharm 2022.3.3 (Professional Edition) Build #PY-223.8836.43, built on March 10, 2023 macOS 13.2.1
I can get pylint to work in one project but not another.
The project where pylint plugin detects error is using python 3.10 Whereas the project that doesnt is using 3.11
The project where it doesn't detect errors in the plugin, works when using commandline. They have slightly different pylintrc files.
plugin fails
[MASTER]
ignore-paths=^.*/tests/.*$
disable=
arguments-renamed,
duplicate-code,
import-error,
invalid-name,
logging-format-interpolation,
logging-fstring-interpolation,
no-member,
no-self-use,
super-init-not-called,
too-few-public-methods,
unused-argument,
useless-super-delegation,
wrong-import-order,
plugin works
[MESSAGES CONTROL]
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
f-string-without-interpolation,
missing-module-docstring,
missing-class-docstring,
missing-function-docstring,
useless-return,
too-few-public-methods,
logging-fstring-interpolation,
too-many-instance-attributes,
invalid-name,
arguments-renamed,
try-except-raise,
Edit:
I narrowed it down to the disable option of no-self-use
. The plugin works when I remove that option.
If anyone else finds this thread, my issue was also an invalid linting key that caused my issue. I had max-complexity
in my .pylintrc
file and once i removed it, pylint started working again in PyCharm. But then i realized I needed to specify the plugin for that particular check to succeed
Step 1: Are you in the right place?
Step 2: Describe your environment
0.12.2
2019.1 CE
2.5.2
Step 3: Describe the problem:
When i run pylint from terminal, it reports errors. But from Intellij, it does not.
Steps to reproduce:
Observed Results:
Expected Results:
venv
Relevant Code: