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
200 stars 36 forks source link

Pylint inspect java error #54

Open cbroque opened 4 years ago

cbroque commented 4 years ago

Step 1: Are you in the right place?

Step 2: Describe your environment

Step 3: Describe the problem:

Next error is gotten when you run python code inspection: Unexpected Exception Caught The scan failed due to an exception: null java.lang.NullPointerException at com.leinardi.pycharm.pylint.PylintInspection.lambda$inspectFile$1(PylintInspection.java:90) at java.base/java.util.ArrayList.removeIf(ArrayList.java:1701) at java.base/java.util.ArrayList.removeIf(ArrayList.java:1689) at com.leinardi.pycharm.pylint.PylintInspection.lambda$inspectFile$2(PylintInspection.java:89) at java.base/java.util.HashMap$Values.forEach(HashMap.java:976) at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1083) at com.leinardi.pycharm.pylint.PylintInspection.inspectFile(PylintInspection.java:89) at com.leinardi.pycharm.pylint.PylintInspection.lambda$checkFile$0(PylintInspection.java:65) at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:322) at java.base/java.util.concurr... (show balloon)

Steps to reproduce:

  1. Install pylint plugin from settings.
  2. Check if the path is correct and fix it if necesary on other settings
  3. Run code inspection

Observed Results:

Expected Results:

Pylint inspection results

Relevant Code:

System.out.println("Hello, world!");
java.lang.RuntimeException: This is an example Exception log
    at com.leinardi.HelloWorld
    at com.leinardi.HelloWorld$ThisIsNotARealLog
    at bigcorporate.app.Instrumentation.callActivityOnResume(Instrumentation.kt)
cbroque commented 4 years ago

I managed to solve this. I tried to upgrade the pylint version on the project interpreter settings, I was unable to do it, I had to force the upgrade to version 1.9.5 from cli, using the pip inside the project interpreter folder.

After that all is working fine

cbroque commented 4 years ago

You can close this issue

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had activity in the last 60 days.