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

empty_comment errors reduces reported score by too much #4156

Closed
orSolocate opened this issue Feb 28, 2021 · 5 comments
Closed

empty_comment errors reduces reported score by too much #4156

orSolocate opened this issue Feb 28, 2021 · 5 comments
Labels
Enhancement ✨ Improvement to a component

Comments

@orSolocate
Copy link
Contributor

Steps to reproduce

  1. open empty_comment,py unit-test data file path in terminal at: tests/extensions/data/empty_comment.py

  2. run Pylint with the empty-comment extension Add checker for empty comments #3870:
    pylint --load-plugins=pylint.extensions.empty_comment empty_comment.py

  3. Watch Pylint output in the console.

Current behavior

************* Module empty_comment
empty_comment.py:2:0: R2044: Line with empty comment (empty-comment)
empty_comment.py:3:0: R2044: Line with empty comment (empty-comment)
empty_comment.py:5:0: R2044: Line with empty comment (empty-comment)
empty_comment.py:7:0: R2044: Line with empty comment (empty-comment)


Your code has been rated at 3.33/10

--> Score is very low!

Expected behavior

Since this error is of type Refactor, you would expect it would not reduce the score by that much.

pylint --version output

pylint 2.8.0-dev1
astroid 2.5
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)]

@orSolocate
Copy link
Contributor Author

I wrote the checker so I could fix it. Just let me know what priority value to put. right now the priority level is -1 which is very high. should -5 be good enough?

@Pierre-Sassoulas Pierre-Sassoulas added the Enhancement ✨ Improvement to a component label Feb 28, 2021
@orSolocate
Copy link
Contributor Author

@Pierre-Sassoulas you agree with the change?

@Pierre-Sassoulas
Copy link
Member

Yes, but I think this is something that should be fixed with #2399. I don't think there is a specific checker to do ? Also what does the priority have to do with the score ? Isn't it the message type that has an influence ? (Error being *5 right now and all the other * 1)

@orSolocate
Copy link
Contributor Author

@Pierre-Sassoulas Yeah you are right the priority is for the linter to figure out how to order the checkers in a 'run queue'. doesn't affect the score. The message type R seems to be right for me for this checker. Might be related to the score calculation bug you mentioned.
You could close this issue.

@Pierre-Sassoulas
Copy link
Member

Thanks for your input, I'm closing in favor of #2399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component
Projects
None yet
Development

No branches or pull requests

2 participants