-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
Metrics/AbcSize: | ||
violation_points: 100_000 | ||
base_points: 1_000_000 | ||
violation_points: 70_000 | ||
Metrics/BlockNesting: | ||
base_points: 30_000 | ||
base_points: 100_000 | ||
Metrics/ClassLength: | ||
base_points: 400_000 | ||
Metrics/CyclomaticComplexity: | ||
base_points: 75_000 | ||
violation_points: 10_000 | ||
base_points: 5_000_000 | ||
violation_points: 35_000 | ||
Metrics/CyclomaticComplexity: # This check is per method | ||
base_points: 1_000_000 | ||
violation_points: 70_000 | ||
Metrics/LineLength: | ||
base_points: 20_000 | ||
violation_points: 5_000 | ||
Metrics/MethodLength: | ||
base_points: 50_000 | ||
violation_points: 10_000 | ||
Metrics/MethodLength: | ||
base_points: 1_000_000 | ||
violation_points: 70_000 | ||
Metrics/ModuleLength: | ||
base_points: 500_000 | ||
violation_points: 5_000 | ||
base_points: 5_000_000 | ||
violation_points: 35_000 | ||
Metrics/ParameterList: | ||
base_points: 10_000 | ||
violation_points: 50_000 | ||
base_points: 500_000 | ||
violation_points: 100_000 | ||
Metrics/PerceivedComplexity: | ||
base_points: 50_000 | ||
violation_points: 5000 | ||
base_points: 1_000_000 | ||
violation_points: 70_000 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Ahhh sorry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! Thanks for the catch. |
||
end | ||
|
||
def issues(output) | ||
|
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?