Method controller_issues_new_after_save
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def controller_issues_new_after_save(context = {})
if context[:request] && context[:project] && context[:issue]
project = context[:project]
request = context[:request]
parameters = request.parameters
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method view_issues_form_details_bottom
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def view_issues_form_details_bottom(context = {})
project = context[:project]
request = context[:request]
parameters = request.parameters
code = parameters[:code]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method create_assignment_info
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_assignment_info(project, assignment)
repository_id = assignment.repository_identifier
o = '<tr>'
o << "<td><b>#{l(:review_assigned_for)}:</b></td>"
o << '<td colspan="3">'
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method view_issues_show_details_bottom_org
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def view_issues_show_details_bottom_org(context = {})
project = context[:project]
return '' unless project
unless User.current.allowed_to?({:controller => 'code_review', :action => 'show'}, project)
return ''
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"