Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/cc/engine/category_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ def initialize(cop_name)
end

def category
CATEGORIES[cop_name] || CATEGORIES[cop] || DEFAULT_CATEGORY
CATEGORIES[cop_name] || CATEGORIES[namespace] || DEFAULT_CATEGORY
end

private

DEFAULT_CATEGORY = "Style".freeze
CATEGORIES = {
"Lint" => "Style",
"Lint/Eval" => "Security",
"Metrics" => "Complexity",
"Metrics/LineLength" => "Style",
"Performance" => "BugRisk",
Expand All @@ -28,7 +29,7 @@ def category

attr_reader :cop_name

def cop
def namespace
cop_name.split("/").first
end
end
Expand Down