pylint-pycharm icon indicating copy to clipboard operation
pylint-pycharm copied to clipboard

Plugin argument doesn't work !

Open m3asmi opened this issue 4 years ago • 5 comments

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)

m3asmi avatar Apr 17 '20 10:04 m3asmi

+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?

jasminhacker avatar Apr 17 '20 16:04 jasminhacker

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

m3asmi avatar Apr 18 '20 09:04 m3asmi

I have this same issue.

bravosierra99 avatar Jul 22 '20 14:07 bravosierra99

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

bravosierra99 avatar Jul 22 '20 14:07 bravosierra99

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...

CarliJoy avatar Jan 04 '22 15:01 CarliJoy