Showing 33 of 44 total issues
Method url
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def url(name, desc, *clients, **options, &block)
Method path_exist
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def path_exist(name, desc, *clients, **options, &block)
Method path_twice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def path_twice(name, desc, *clients, **options, &block)
Method dry_run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def dry_run(cmd)
r = "#{cmd.cmd.gsub(' ', '\\ ')} "
if mode == :createinfobase
r << cmd.args.join(' ')
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 args
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def args
r = {}
r[:name] = name
r[:subparameters] = subparameters if subparameters
r[:group] = group if group
- 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 to_cmd
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def to_cmd
r = ''
args = to_args
args.each_with_index do |v, i|
next unless i.even?
- 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 select_parameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def select_parameters
r = []
AssLauncher::Enterprise::Cli::CliSpec
.cli_def.parameters.parameters.each do |p|
if match?(p) && not_filtred?(p)
- 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 make_command
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def make_command
usr = user
pass = password
uc_ = uc
cs = connection_string
- 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 dsl_method_args
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def dsl_method_args(i)
r = "'#{name}'"
r << ", '#{desc}'" if desc
r << ", #{clients.map(&:to_s).map(&:downcase)
.to_s.gsub(/(\[|\]|")/,'')}" if clients
- 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 to_args_private_proxy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_args_private_proxy(r)
return r unless !wspauto && wspsrv
r += ['/Proxy', '', '-Psrv', wspsrv]
r += ['-PPort', wspport.to_s] if wspport
r += ['-PUser', wspuser] if wspuser
- 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 to_query
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def to_query(args)
r = ''
args.each_with_index do |v, i|
next if (i + 1).even?
r << "#{v.gsub(CLI_TO_WEB_PARAM_NAME, '')}"
- 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 included
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.included(base)
base.fields.each do |f|
base.send(:attr_reader, f.downcase.to_sym) unless\
base.instance_methods.include? f.downcase.to_sym
base.send(:attr_writer, f.downcase.to_sym) unless\
- 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 uri_query
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def uri_query
r = ''
r << "N=#{usr}&" if usr
r << "P=#{pwd}&" if pwd
r << "L=#{locale}&" if locale
- 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"