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

Plugin argument doesn't work ! #62

Open m3asmi opened 4 years ago

m3asmi commented 4 years ago

I am trying to add the https://github.com/OCA/pylint-odoo to Pycharm but it doesn't work with the plugin. here is the configuration image the result from the plugin image the result using external tools image

this the log when I only add one argument--output-format=colorized

10:53   Unexpected Exception Caught
                The scan failed due to an exception: Use JsonReader.setLenient(true) to accept malformed JSON at path $
                Root cause:
                Use JsonReader.setLenient(true) to accept malformed JSON at path $
                com.squareup.moshi.JsonEncodingException: Use JsonReader.setLenient(true) to accept malformed JSON at path $
                at com.squareup.moshi.JsonReader.syntaxError(JsonReader.java:233)
                at com.squareup.moshi.JsonUtf8Reader.checkLenient(JsonUtf8Reader.java:1051)
                at com.squareup.moshi.JsonUtf8Reader.doPeek(JsonUtf8Reader.java:366)
                at com.squareup.moshi.JsonUtf8Reader.peek(JsonUtf8Reader.java:193)
                at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:134)
                at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:36)
                at com.leinardi.pycharm.pylint.plapi.PylintRunner.scan(PylintRunner.java:283)
                at com.leinardi.pycharm.pylint.checker.ScanFiles.scan(ScanFiles.java:108)... (show balloon)
jasminhacker commented 4 years ago

+1

Tried to add the pylint_django plugin but it did not work either.

Edit: Although I'm using the pylint binary outside of my virtualenv, I had to install the plugin in the virtualenv as well. Now the plugin works like a charm. Maybe this helps you as well, @m3asmi?

m3asmi commented 4 years ago

thank you @jonathanhacker for the tip, but I'm not using virtualenv

bravosierra99 commented 3 years ago

I have this same issue.

bravosierra99 commented 3 years ago

interesting, it does seem to be related to the colorized parameter. I took that out and suddenly it seems to work just fine.

CarliJoy commented 2 years ago

Look in the source code. The plugin calls pylint the the --output-format json to extract the result of pylint.

So of course if you use --output-format=colorized it will fail, as it now doesn't get the JSON result it expects...