Showing 43 of 44 total issues
File application.rb
has 702 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "optparse"
require "rake/task_manager"
require "rake/file_list"
require "rake/thread_pool"
Method standard_rake_options
has 215 lines of code (exceeds 25 allowed). Consider refactoring. Open
def standard_rake_options # :nodoc:
sort_options(
[
["--all", "-A",
"Show all tasks, even uncommented ones (in combination with -T or -D)",
File jamis.rb
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
module RDoc
module Page
FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
Class Application
has 55 methods (exceeds 20 allowed). Consider refactoring. Open
class Application
include TaskManager
include TraceOutput
# The name of the application (typically 'rake')
Class Task
has 47 methods (exceeds 20 allowed). Consider refactoring. Open
class Task
# List of prerequisites for a task.
attr_reader :prerequisites
alias prereqs prerequisites
Class FileList
has 29 methods (exceeds 20 allowed). Consider refactoring. Open
class FileList
include Cloneable
# == Method Delegation
Method define
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def define
fail "Version required (or :noversion)" if @version.nil?
@version = nil if :noversion == @version
desc "Build all the packages"
- 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
File task.rb
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "rake/invocation_exception_mixin"
module Rake
##
Method start_thread
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def start_thread # :nodoc:
@threads_mon.synchronize do
next unless @threads.count < @max_active_threads
t = Thread.new 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 standard_rake_options
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def standard_rake_options # :nodoc:
sort_options(
[
["--all", "-A",
"Show all tasks, even uncommented ones (in combination with -T or -D)",
- 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 define
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def define
desc @description
task @name => Array(deps) do
FileUtilsExt.verbose(@verbose) do
puts "Use TESTOPTS=\"--verbose\" to pass --verbose" \
- 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 enhance_with_matching_rule
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def enhance_with_matching_rule(task_name, level=0)
fail Rake::RuleRecursionOverflowError,
"Rule Recursion Too Deep" if level >= 16
@rules.each do |pattern, args, extensions, order_only, block|
if pattern && pattern.match(task_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 invoke_with_call_chain
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def invoke_with_call_chain(task_args, invocation_chain)
new_chain = Rake::InvocationChain.append(self, invocation_chain)
@lock.synchronize do
begin
if application.options.trace
- 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
File file_list.rb
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "rake/cloneable"
require "rake/file_utils_ext"
require "rake/ext/string"
module Rake
Method define
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def define
fail "Version required (or :noversion)" if @version.nil?
@version = nil if :noversion == @version
desc "Build all the packages"
Method sh
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def sh(*cmd, &block)
options = (Hash === cmd.last) ? cmd.pop : {}
shell_runner = block_given? ? block : create_shell_runner(cmd)
set_verbose_option(options)
- 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 egrep
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def egrep(pattern, *options)
matched = 0
each do |fn|
begin
File.open(fn, "r", *options) do |inf|
- 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 display_tasks_and_comments
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def display_tasks_and_comments # :nodoc:
displayable_tasks = tasks.select { |t|
(options.show_all_tasks || t.comment) &&
t.name =~ options.show_task_pattern
}
Method pathmap
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def pathmap(spec=nil, &block)
return self if spec.nil?
result = "".dup
spec.scan(/%\{[^}]*\}-?\d*[sdpfnxX%]|%-?\d+d|%.|[^%]+/) do |frag|
case frag
Method terminal_width
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def terminal_width # :nodoc:
if @terminal_columns.nonzero?
result = @terminal_columns
else
result = unix? ? dynamic_width : 80
- 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"