Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Pylint score #41

Open
arturbacu opened this issue Feb 6, 2019 · 16 comments
Open

Provide Pylint score #41

arturbacu opened this issue Feb 6, 2019 · 16 comments

Comments

@arturbacu
Copy link

arturbacu commented Feb 6, 2019

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
Copy link

stale bot commented Apr 7, 2019

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

@stale stale bot added the Status: Stale label Apr 7, 2019
@gatormc9
Copy link

gatormc9 commented Oct 8, 2019

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.

@stale stale bot removed the Status: Stale label Oct 8, 2019
@baterflyrity
Copy link

baterflyrity commented Nov 2, 2019

I like bots but maybe someone can respond here before #41 (comment) will ignore this thread again?

@leinardi
Copy link
Owner

leinardi commented Nov 2, 2019

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

@baterflyrity
Copy link

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
Copy link

stale bot commented Jan 2, 2020

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

@stale stale bot added the Status: Stale label Jan 2, 2020
@dudelburg
Copy link

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
Copy link

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
Copy link
Author

Putting it in version 3 sounds good to me

@Pierre-Sassoulas
Copy link

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

@baterflyrity
Copy link

baterflyrity commented Mar 30, 2021

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
Copy link

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
Copy link

baterflyrity commented Mar 30, 2021

@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
Copy link

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
Copy link

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
Copy link

This issue is blocked by the json specification in pylint and the lack of progress on it (pylint-dev/pylint#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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants