Skip to content
Snippets Groups Projects
Commit e723dc13 authored by Maxim Rydkin's avatar Maxim Rydkin Committed by Robert Speicher
Browse files

Decrease Perceived Complexity threshold to 15

parent 467dffa6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -665,7 +665,7 @@ Metrics/ParameterLists:
# A complexity metric geared towards measuring complexity for a human reader.
Metrics/PerceivedComplexity:
Enabled: true
Max: 17
Max: 15
 
# Lint ########################################################################
 
Loading
Loading
Loading
Loading
@@ -241,13 +241,7 @@ class Event < ActiveRecord::Base
 
def action_name
if push?
if new_ref?
"pushed new"
elsif rm_ref?
"deleted"
else
"pushed to"
end
push_action_name
elsif closed?
"closed"
elsif merged?
Loading
Loading
@@ -263,11 +257,7 @@ class Event < ActiveRecord::Base
elsif commented?
"commented on"
elsif created_project?
if project.external_import?
"imported"
else
"created"
end
created_project_action_name
else
"opened"
end
Loading
Loading
@@ -360,6 +350,24 @@ class Event < ActiveRecord::Base
 
private
 
def push_action_name
if new_ref?
"pushed new"
elsif rm_ref?
"deleted"
else
"pushed to"
end
end
def created_project_action_name
if project.external_import?
"imported"
else
"created"
end
end
def recent_update?
project.last_activity_at > RESET_PROJECT_ACTIVITY_INTERVAL.ago
end
Loading
Loading
---
title: Decrease Perceived Complexity threshold to 15
merge_request: 14160
author: Maxim Rydkin
type: other
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment