Showing 679 of 1,357 total issues
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(number, author = nil, time = nil, message = nil, changeset = nil)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(number, author = nil, time = nil, message = nil, changeset = nil)
Method request_build
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def request_build
if builder_state_and_activity == 'builder_down'
BuilderStarter.begin_builder(name)
10.times do
sleep 1.second.to_i
- 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 do_clean_checkout?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def do_clean_checkout?
case @clean_checkout_when
when :always then true
when nil, :never then false
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 checkout
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def checkout(revision = nil, stdout = $stdout, checkout_path = path)
raise 'Repository location is not specified' unless @repository
raise "#{checkout_path} is not empty, cannot clone a project into it" unless (Dir.entries(checkout_path) - ['.', '..']).empty?
FileUtils.rm_rf(checkout_path)
- 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 detect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def detect(path)
git = File.directory?(File.join(path, '.git'))
svn = File.directory?(File.join(path, '.svn'))
hg = File.directory?(File.join(path, '.hg'))
bzr = File.directory?(File.join(path, '.bzr'))
- 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 precise
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def precise
result = []
result << "#{@hours} #{hours_label}" unless @hours == 0
result << "#{@minutes} #{minutes_label}" unless @minutes == 0
result << "#{@seconds} #{seconds_label}" unless @seconds == 0 and @duration != 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 start
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def start(start_cmd)
cmd = start_cmd || "cd #{CRUISE_HOME} && ./cruise start -d"
log(:env, ENV.inspect)
# remove cruise pid file if process is no longer running
- 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_child_process
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def create_child_process(project_name, command)
Bundler.with_clean_env do
if Kernel.respond_to?(:fork)
begin
pid = fork || safely_exec(command)
- 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 load_all
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def load_all
plugins_to_load.each do |plugin|
if can_load_immediately?(plugin)
load_plugin(File.basename(plugin))
elsif File.directory?(plugin)
- 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
Avoid too many return
statements within this function. Open
return rootjQuery.ready( selector );
Avoid too many return
statements within this function. Open
return jQuery.makeArray( selector, this );
Avoid too many return
statements within this function. Open
return oldSizzle(query, context, extra, seed);
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return diff === 0;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return { top: top, left: left };
Avoid too many return
statements within this function. Open
return this.css( type, typeof size === "string" ? size : size + "px" );
Avoid too many return
statements within this function. Open
return makeArray( context.querySelectorAll(query), extra );