Showing 372 of 392 total issues
Method convert_regexp_handlings
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def convert_regexp_handlings str, attrs, exclusive = false
@regexp_handlings.each do |regexp, attribute|
next unless exclusive == exclusive?(attribute)
str.scan(regexp) do
capture = $~.size == 1 ? 0 : 1
- 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_attributes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def display_attributes
puts
puts @str.tr(NULL, "!")
bit = 1
16.times do |bno|
- 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 finish
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def finish
if @write_options then
write_options
exit
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 tt_sections
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def tt_sections text
flow = @am.flow text.dup
flow.each do |item|
case item
- 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 deeply nested control flow statements. Open
if empty then
label << data
next if empty == :continue
break
end
Avoid deeply nested control flow statements. Open
if peek_type.nil? || column < margin then
empty = true
elsif column == margin then
case peek_type
when type
Avoid deeply nested control flow statements. Open
while peek_type == :NEWLINE
get
peek_type, _, column, = peek_token
end
Function performSearch
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function performSearch(data, regexps, queries, highlighters, state) {
Method create_attr
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_attr container, single, name, rw, comment # :nodoc:
Method for
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def self.for top_level, file_name, content, options, stats
Method documentation_page
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def documentation_page store, generator, path, req, res
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(text, name, rw, comment, singleton = false)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize server, stores, cache, mount_path = nil, extra_doc_dirs = []
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(top_level, file_name, content, options, stats)
Method parse_meta_method_params
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parse_meta_method_params container, single, meth, tk, comment # :nodoc:
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize top_level, file_name, content, options, stats
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(text, old_name, new_name, comment, singleton = false)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize top_level, file_name, content, options, stats
Method complete_klass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def complete_klass name, klass, selector, method, completions # :nodoc:
Method load_method
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load_method store, cache, klass, type, name