Showing 372 of 392 total issues
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(top_level, file_name, content, options, stats)
Method create_attr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_attr container, single, name, rw, comment # :nodoc:
Function performSearch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function performSearch(data, regexps, queries, highlighters, state) {
Method path
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.path(system = true, site = true, home = true, gems = :latest, *extra_dirs)
Method load_method
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_method store, cache, klass, type, name
Method each
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.each system = true, site = true, home = true, gems = :latest, *extra_dirs # :yields: directory, type
Method complete_klass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_klass name, klass, selector, method, completions # :nodoc:
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize top_level, file_name, content, options, stats
Method handle_directive
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def handle_directive prefix, directive, param, code_object = nil,
encoding = nil
Method generate_class_files
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def generate_class_files
setup
template_file = @template_dir + 'class.rhtml'
template_file = @template_dir + 'classpage.rhtml' 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 documented?
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def documented?
return true if super
return false unless @is_alias_for
case @is_alias_for
when String then
- 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 gather_files
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def gather_files files
files = [@options.root.to_s] if files.empty?
file_list = normalized_file_list files, true, @options.exclude
- 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_attr_comment
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def find_attr_comment var_name, attr_name, read = nil, write = nil
attr_name = Regexp.escape attr_name
rw = if read and write then
/\s*#{read}\s*,\s*#{write}\s*/xm
- 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_aliases
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def do_aliases
@content.scan(/rb_define_alias\s*\(
\s*(\w+),
\s*"(.+?)",
\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 on_variables
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private def on_variables(event, tok, data)
if @in_fname
@lex_state = EXPR_ENDFN
@in_fname = false
@continue = false
- 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 render_template
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def render_template template_file, out_file = nil # :yield: io
io_output = out_file && !@dry_run && @file_output
erb_klass = io_output ? RDoc::ERBIO : ERB
template = template_for template_file, true, erb_klass
- 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 <=>
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def <=>(other)
return unless other.respond_to?(:singleton) &&
other.respond_to?(:name)
[ @singleton ? 0 : 1, 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 report_attributes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def report_attributes cm
return if cm.attributes.empty?
report = []
- 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 skip_tkspace_comment
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def skip_tkspace_comment(skip_nl = true)
loop do
skip_nl ? skip_tkspace : skip_tkspace_without_nl
next_tk = peek_tk
return if next_tk.nil? || (:on_comment != next_tk[:kind] and :on_embdoc != next_tk[:kind])
- 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 parse_comment
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parse_comment container, tk, comment
return parse_comment_tomdoc container, tk, comment if @markup == 'tomdoc'
column = tk[:char_no]
line_no = comment.line.nil? ? tk[:line_no] : comment.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"