-
Notifications
You must be signed in to change notification settings - Fork 45
Tune remediation points #42
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
Conversation
@@ -323,7 +323,7 @@ def includes_check?(output, cop_name) | |||
def includes_content_for?(output, cop_name) | |||
issue = issues(output).detect { |i| i["check_name"] =~ /#{cop_name}$/ } | |||
|
|||
issue["content"]["body"].present? | |||
issue["content"] && issue["content"]["body"].present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't related, but came up when running tests. Happy to remove for cleaner diff if preferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this drive-by, but I'd make it its own commit if you can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Moved to separate commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still only see one commit on this branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh sorry.
Fixed. Then made additional changed and squashed everything again. My bad. Updating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Thanks for the catch.
638193e
to
70a6461
Compare
Metrics/CyclomaticComplexity: | ||
base_points: 75_000 | ||
violation_points: 10_000 | ||
base_points: 1_000_000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this effectively mean that any instance of Cyclomatic complexity makes a file a "B"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2,000,000 remediation points are needed in penalties to go from A to B.
So not always, but a lot of the time an instance of Cyclomatic Complexity could have that large of grade impact.
I was talking with @brynary yesterday and had the impression that that level of grade impact would be close to what we want for complexity - but maybe requires some additional discussion?
@codeclimate/review @brynary Ready for another look! |
from commit message:
|
4c20d34
to
731862a
Compare
Ready for re-review. |
cc @codeclimate/review |
731862a
to
21e346a
Compare
LGTM |
violation_points: 5_000 | ||
Metrics/MethodLength: | ||
base_points: 50_000 | ||
base_points: 100_000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is LineLength
for a single LOC being too long (wide)? If so, this seems too high.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, concur that's the offense.
Reverting to the current setting:
Metrics/LineLength:
base_points: 20_000
violation_points: 5_000
if that sounds good?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So for a style thing (like missing semicolon in JS) we do 50k. I think that applies here as well. I'm not sure anything would ever be less than 50k, since the 50k number is intended to account for the time it takes to open the file, make the change, save, commit, push... it's about 5 mins even for something small.
For a long line, it doesn't seem to get harder to fix as the line gets longer. Therefore, I'd just do a flat 50k.
Reviewed again. Had one question about |
21e346a
to
17d6f9e
Compare
Tune complexity points, creating more parity with Ruby analysis in Code Climate classic. - Class violations: 5_000_000 + n35_000 - Method violations: 1_000_000 + n70_000
17d6f9e
to
342a501
Compare
Tune remediation points
Tune complexity points, following calculation function in codeclimate-eslint, creating more parity with Ruby analysis in Code Climate classic.
cc @codeclimate/review @noahd1