Showing 337 of 433 total issues
Avoid too many return
statements within this method. Open
handle_blocked_ip(@info_request) && return
Avoid too many return
statements within this method. Open
return true if @user
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return
Avoid too many return
statements within this method. Open
return true if subject.start_with? "out of office autoreply:"
Avoid too many return
statements within this method. Open
return true if subject.end_with? "is out of the office"
Avoid too many return
statements within this method. Open
return true if subject == "out of office"
Avoid too many return
statements within this method. Open
return true if subject == "out of office reply"
Function d3TimeSeries
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function d3TimeSeries(selector, data, title, metric_name) {
// Add the title
var wrapper_element = document.querySelectorAll(selector)[0];
- 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 line
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def line(opts = {})
_line = read_attribute(:line)
if opts[:redact]
_line = strip_syslog_prefix(_line)
- 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 user_name_slug
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def user_name_slug
if is_external?
if external_user_name.nil?
fake_slug = "anonymous"
else
- 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 translated_fields
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def translated_fields
fields = @template.tag.div id: 'div-locales' do
@template.concat(locale_tabs)
locales = @template.tag.div class: 'tab-content' do
- 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 track_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def track_list
@view = params[:view]
if @view == 'recent' || @view.nil? # the blank one for backwards compatibility
@track_thing = TrackThing.create_track_for_all_new_requests
- 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 find_all_unknown_mime_types
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.find_all_unknown_mime_types
IncomingMessage.find_each do |incoming_message|
incoming_message.get_attachments_for_display.each do |attachment|
if attachment.content_type.nil?
raise "internal error incoming_message " + incoming_message.id.to_s
- 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 internal_admin_body
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.internal_admin_body
matching_pbs = AlaveteliLocalization.
with_locale(AlaveteliLocalization.default_locale) do
default_scoped.where(url_name: 'internal_admin_authority')
end
- 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 is_followupable?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def is_followupable?(incoming_message)
if is_external?
@followup_bad_reason = "external"
false
elsif !OutgoingMailer.is_followupable?(self, incoming_message)
- 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 status_text_waiting_clarification
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def status_text_waiting_clarification(info_request, opts = {})
is_owning_user = opts.fetch(:is_owning_user)
str = ''.html_safe
- 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 get_body_for_html_display
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_body_for_html_display(collapse_quoted_sections = true)
# Find the body text and remove emails for privacy/anti-spam reasons
text = get_main_body_text_unfolded
folded_quoted_text = get_main_body_text_folded
- 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 default_config
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def default_config
tmp_dir = File.join(File.dirname(__FILE__), '../tmp')
GEM_VERSIONS.inject({}) do |m, (r, v)|
uri = URI(
- 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"