Skip to content

Commit 28e540f

Browse files
committed
Merge pull request #62 from codeclimate/jp/eval-is-a-security-risk
Move Lint/Eval to the Security category
2 parents 76ddbb9 + 94d7b27 commit 28e540f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/cc/engine/category_parser.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ def initialize(cop_name)
66
end
77

88
def category
9-
CATEGORIES[cop_name] || CATEGORIES[cop] || DEFAULT_CATEGORY
9+
CATEGORIES[cop_name] || CATEGORIES[namespace] || DEFAULT_CATEGORY
1010
end
1111

1212
private
1313

1414
DEFAULT_CATEGORY = "Style".freeze
1515
CATEGORIES = {
1616
"Lint" => "Style",
17+
"Lint/Eval" => "Security",
1718
"Metrics" => "Complexity",
1819
"Metrics/LineLength" => "Style",
1920
"Performance" => "BugRisk",
@@ -28,7 +29,7 @@ def category
2829

2930
attr_reader :cop_name
3031

31-
def cop
32+
def namespace
3233
cop_name.split("/").first
3334
end
3435
end

0 commit comments

Comments
 (0)