Skip to content

Commit f305da3

Browse files
author
Ashley Baldwin-Hunter
committed
Merge pull request #42 from codeclimate/abh-tune-remediation-points
Tune remediation points
2 parents 038705e + 342a501 commit f305da3

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

config/cops.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
Metrics/AbcSize:
2-
violation_points: 100_000
2+
base_points: 1_000_000
3+
violation_points: 70_000
34
Metrics/BlockNesting:
4-
base_points: 30_000
5+
base_points: 100_000
56
Metrics/ClassLength:
6-
base_points: 400_000
7-
Metrics/CyclomaticComplexity:
8-
base_points: 75_000
9-
violation_points: 10_000
7+
base_points: 5_000_000
8+
violation_points: 35_000
9+
Metrics/CyclomaticComplexity: # This check is per method
10+
base_points: 1_000_000
11+
violation_points: 70_000
1012
Metrics/LineLength:
11-
base_points: 20_000
12-
violation_points: 5_000
13-
Metrics/MethodLength:
1413
base_points: 50_000
15-
violation_points: 10_000
14+
Metrics/MethodLength:
15+
base_points: 1_000_000
16+
violation_points: 70_000
1617
Metrics/ModuleLength:
17-
base_points: 500_000
18-
violation_points: 5_000
18+
base_points: 5_000_000
19+
violation_points: 35_000
1920
Metrics/ParameterList:
20-
base_points: 10_000
21-
violation_points: 50_000
21+
base_points: 500_000
22+
violation_points: 100_000
2223
Metrics/PerceivedComplexity:
23-
base_points: 50_000
24-
violation_points: 5000
24+
base_points: 1_000_000
25+
violation_points: 70_000

spec/cc/engine/rubocop_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def includes_check?(output, cop_name)
323323
def includes_content_for?(output, cop_name)
324324
issue = issues(output).detect { |i| i["check_name"] =~ /#{cop_name}$/ }
325325

326-
issue["content"]["body"].present?
326+
issue["content"] && issue["content"]["body"].present?
327327
end
328328

329329
def issues(output)

0 commit comments

Comments
 (0)