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

Provide Pylint score #41

Open arturbacu opened 5 years ago

arturbacu commented 5 years ago

Is your feature request related to a problem? Please describe. No, this is just a feature request for something which is in the CLI version of pylint but doesn't seem tobe in this plugin.

Describe the solution you'd like When using Pylint from the CLI, it provides a score out of 10.0 for your code. This provides a nice, quick way to gauge improvements in the code before drilling down to the individual errors/warnings/refactoring/etc. Would it be possible to provide this information through this PyCharm plugin as well?

Describe alternatives you've considered The only alternative currently would be run the Pylint plugin in PyCharm then separately run the CLI tool to get the score.

Additional context For example, in one CLI run of pylint, after the list of issues it found, it reports: Your code has been rated at 9.86/10 (previous run: 9.86/10, +0.00)

stale[bot] commented 5 years ago

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

gatormc9 commented 5 years ago

If possible, I would also like to see the code rating or score. I find it helpful to see the result of my code being scored higher after making changes.

baterflyrity commented 4 years ago

I like bots but maybe someone can respond here before https://github.com/leinardi/pylint-pycharm/issues/41#issuecomment-480628556 will ignore this thread again?

leinardi commented 4 years ago

Currently I don't have time to work on new features but Pull Request are welcome.

baterflyrity commented 4 years ago

Currently I don't have time to work on new features but Pull Request are welcome.

Sorry but I don't know java. Actually I'm using self-made analog of this plugin in python. Good luck! Hope you'll find some time in near future.

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.

dudelburg commented 3 years ago

I looked into this because of personal interest and found this comment. Looks like we have to still wait a while to implement this.

Pierre-Sassoulas commented 3 years ago

The problem with the json score is fixed in pylint dev branch, but we can't put it in a 2.X version in order to not break compatibility. We might release a pylint 3 alpha release if you're interested, let me know.

arturbacu commented 3 years ago

Putting it in version 3 sounds good to me

Pierre-Sassoulas commented 3 years ago

We released 3.0.0a0 with the fix, let me know if there is any problem.

baterflyrity commented 3 years ago

We released 3.0.0a0 with the fix, let me know if there is any problem.

@Pierre-Sassoulas,

The scan failed due to an error - please see the event log for more information

Event log:

Unexpected Exception Caught
The scan failed due to an exception: An error occurred while scanning a file. Root cause: null      
java.lang.NullPointerException   at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:98)   at  
java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)   at  
java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)   at  
java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)   at  
java.base/java.nio.file.Path.of(Path.java:147)   at java.base/java.nio.file.Paths.get(Paths.java:69)   at  
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.normalisePath(ProcessResultsThread.java:117)   at  
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.filenameFrom(ProcessResultsThread.java:111)   at  
com.leinardi.pycharm.pylint.plapi.ProcessResultsThread.run(ProcessResultsThread.java:86)   at  
com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:860)   at  
com.leinardi.pycharm.pylint.checker.ScanFiles.scan(ScanFiles.java:120)   at  
com.leinardi.pycharm.pylint.checker.ScanFiles.checkFiles(ScanFiles.java:100)   at  
com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:74)   at  
com.leinardi.pycharm.pylint.checker.ScanFiles.call(ScanFiles.java:46)   at  
com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)   at  
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)   at  
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)   at  
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)   at  
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)   at  
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)   at  
java.base/java.security.AccessController.doPrivileged(Native Method)   at  
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)   at  
java.base/java.lang.Thread.run(Thread.java:834)
Pierre-Sassoulas commented 3 years ago

I don't know what to look for in your stacktrace, what was the uncaught exception in pylint ? (By the way we released 3.0.0a1 because of a problem with disabling warning, so you should use the new one even if it probably won't fix your current problem :) .)

baterflyrity commented 3 years ago

@Pierre-Sassoulas, me too. Just pylint 2.7.4 worked correctly but without scoring while now pylint 3 doesnt work at all. Unfortunatelly, 3.0.0a1doesnt fix this problem((

Pierre-Sassoulas commented 3 years ago

Ok, let's debug it together then :) Can you open a pylint issue with the pylint command launched just before the crash and the code on which it was launched ?

addisonklinke commented 3 years ago

Any recent updates on the progress here? This would be a great feature! I also unfortunately do not know Java, so I cannot help in contributing a PR

Pierre-Sassoulas commented 2 years ago

This issue is blocked by the json specification in pylint and the lack of progress on it (https://github.com/PyCQA/pylint/issues/4741). We need to implement that new json specification, and release a new 3.0 alpha first (most likely after pylint 2.12 or 2.13 is out).