Showing 67 of 80 total issues
Avoid too many return
statements within this method. Open
return true
Avoid too many return
statements within this method. Open
return true
Method create_ilm_policy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_ilm_policy(datastream_name, template_name, ilm_name, host = nil)
unless @data_stream_ilm_policy_overwrite
return if data_stream_exist?(datastream_name, host) or template_exists?(template_name, host) or ilm_policy_exists?(ilm_name, host)
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 client
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def client(host = nil, compress_connection = false)
return cloud_client if @cloud_id
# check here to see if we already have a client connection for the given host
connection_options = get_connection_options(host)
- 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 send_bulk
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def send_bulk(data, host, index)
begin
prepared_data = if compression
gzip(data)
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 configure
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def configure(conf)
super
if !@use_entire_record
if @record_keys.empty? && @use_record_as_seed
- 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_affinity_target_indices
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_affinity_target_indices(chunk)
indices = Hash.new
if target_index_affinity_enabled?()
id_key_accessor = record_accessor_create(@id_key)
ids = Set.new
- 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"