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

Provide Pylint score

Open arturbacu opened this issue 5 years ago • 16 comments

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)

arturbacu avatar Feb 06 '19 20:02 arturbacu

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

stale[bot] avatar Apr 07 '19 20:04 stale[bot]

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.

gatormc9 avatar Oct 08 '19 14:10 gatormc9

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?

baterflyrity avatar Nov 02 '19 20:11 baterflyrity

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

leinardi avatar Nov 02 '19 22:11 leinardi

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.

baterflyrity avatar Nov 03 '19 09:11 baterflyrity

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

stale[bot] avatar Jan 02 '20 17:01 stale[bot]

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

dudelburg avatar Dec 01 '20 12:12 dudelburg

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.

Pierre-Sassoulas avatar Mar 07 '21 09:03 Pierre-Sassoulas

Putting it in version 3 sounds good to me

arturbacu avatar Mar 07 '21 12:03 arturbacu

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

Pierre-Sassoulas avatar Mar 29 '21 20:03 Pierre-Sassoulas

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)

baterflyrity avatar Mar 30 '21 08:03 baterflyrity

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

Pierre-Sassoulas avatar Mar 30 '21 08:03 Pierre-Sassoulas

@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((

baterflyrity avatar Mar 30 '21 11:03 baterflyrity

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 ?

Pierre-Sassoulas avatar Mar 30 '21 12:03 Pierre-Sassoulas

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

addisonklinke avatar Oct 07 '21 20:10 addisonklinke

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

Pierre-Sassoulas avatar Oct 09 '21 19:10 Pierre-Sassoulas