Showing 388 of 406 total issues
File entities.rb
has 2127 lines of code (exceeds 250 allowed). Consider refactoring. Open
RDoc::Markdown::HTML_ENTITIES = {
"AElig" => [0x000C6],
"AMP" => [0x00026],
"Aacute" => [0x000C1],
"Abreve" => [0x00102],
File ruby.rb
has 1528 lines of code (exceeds 250 allowed). Consider refactoring. Open
if ENV['RDOC_USE_PRISM_PARSER']
require 'rdoc/parser/prism_ruby'
RDoc::Parser.const_set(:Ruby, RDoc::Parser::PrismRuby)
puts "========================================================================="
puts "RDoc is using the experimental Prism parser to generate the documentation"
Method parse_statements
has a Cognitive Complexity of 156 (exceeds 5 allowed). Consider refactoring. Open
def parse_statements(container, single = NORMAL, current_method = nil,
comment = new_comment(''))
raise 'no' unless RDoc::Comment === comment
comment = RDoc::Encoding.change_encoding comment, @encoding if @encoding
- 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 driver.rb
has 963 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'optparse'
require_relative '../../rdoc'
require_relative 'formatter' # For RubyGems backwards compatibility
Method parse
has 415 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse argv
ignore_invalid = true
argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT']
File prism_ruby.rb
has 826 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'prism'
require_relative 'ripper_state_lex'
# Unlike lib/rdoc/parser/ruby.rb, this file is not based on rtags and does not contain code from
# rtags.rb -
File options.rb
has 809 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'optparse'
require 'pathname'
##
# RDoc::Options handles the parsing and storage of options
File c.rb
has 734 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'tsort'
##
# RDoc::Parser::C attempts to parse C extension files. It looks for
# the standard patterns that you find in extensions: +rb_define_class+,
File context.rb
has 666 lines of code (exceeds 250 allowed). Consider refactoring. Open
class RDoc::Context < RDoc::CodeObject
include Comparable
##
Class Context
has 78 methods (exceeds 20 allowed). Consider refactoring. Open
class RDoc::Context < RDoc::CodeObject
include Comparable
##
Method parse
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
def parse argv
ignore_invalid = true
argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT']
- 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
Class Ruby
has 73 methods (exceeds 20 allowed). Consider refactoring. Open
class RDoc::Parser::Ruby < RDoc::Parser
parse_files_matching(/\.rbw?$/)
include RDoc::TokenStream
Function prototype
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
Searcher.prototype = new function() {
// search is performed in chunks of 1000 for non-blocking user input
var CHUNK_SIZE = 1000;
// do not try to find more than 100 results
var MAX_RESULTS = 100;
- 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 build_list
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def build_list margin
p :list_start => margin if @debug
list = RDoc::Markup::List.new
label = nil
- 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 get_included_module_with_optional_parens
has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring. Open
def get_included_module_with_optional_parens
skip_tkspace_without_nl
get_tkread
tk = get_tk
end_token = get_end_token tk
- 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
Class Driver
has 60 methods (exceeds 20 allowed). Consider refactoring. Open
class RDoc::RI::Driver
##
# Base Driver error class
Method add_class
has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring. Open
def add_class class_type, given_name, superclass = '::Object'
# superclass +nil+ is passed by the C parser in the following cases:
# - registering Object in 1.8 (correct)
# - registering BasicObject in 1.9 (correct)
# - registering RubyVM in 1.9 in iseq.c (incorrect: < Object in vm.c)
- 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
Class Store
has 58 methods (exceeds 20 allowed). Consider refactoring. Open
class RDoc::Store
##
# Errors raised from loading or saving the store
File class_module.rb
has 510 lines of code (exceeds 250 allowed). Consider refactoring. Open
class RDoc::ClassModule < RDoc::Context
##
# 1::
# RDoc 3.7
File store.rb
has 507 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'fileutils'
##
# A set of rdoc data for a single project (gem, path, etc.).
#