Showing 406 of 406 total issues

Method complete_klass has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

  def complete_klass name, klass, selector, method, completions # :nodoc:
Severity: Minor
Found in lib/rdoc/ri/driver.rb - About 35 mins to fix

    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
    Severity: Minor
    Found in lib/rdoc/ri/paths.rb - About 35 mins to fix

      Method add_alias has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        def add_alias(var_name, class_obj, old_name, new_name, comment)
      Severity: Minor
      Found in lib/rdoc/parser/c.rb - About 35 mins to fix

        Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          def initialize top_level, file_name, content, options, stats
        Severity: Minor
        Found in lib/rdoc/parser/c.rb - About 35 mins to fix

          Method raw_path has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            def self.raw_path(system, site, home, gems, *extra_dirs)
          Severity: Minor
          Found in lib/rdoc/ri/paths.rb - About 35 mins to fix

            Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              def initialize(top_level, file_name, content, options, stats)
            Severity: Minor
            Found in lib/rdoc/parser/simple.rb - About 35 mins to fix

              Method path has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                def self.path(system = true, site = true, home = true, gems = :latest, *extra_dirs)
              Severity: Minor
              Found in lib/rdoc/ri/paths.rb - About 35 mins to fix

                Method initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  def initialize(top_level, file_name, content, options, stats)
                Severity: Minor
                Found in lib/rdoc/parser/prism_ruby.rb - About 35 mins to fix

                  Method load_method has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    def load_method store, cache, klass, type, name
                  Severity: Minor
                  Found in lib/rdoc/ri/driver.rb - About 35 mins to fix

                    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
                    Severity: Minor
                    Found in lib/rdoc/generator/darkfish.rb - About 35 mins to fix

                    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
                    Severity: Minor
                    Found in lib/rdoc/code_object/constant.rb - About 35 mins to fix

                    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_class_specification has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def get_class_specification
                        tk = peek_tk
                        if tk.nil?
                          return ''
                        elsif :on_kw == tk[:kind] && 'self' == tk[:text]
                    Severity: Minor
                    Found in lib/rdoc/parser/ruby.rb - About 35 mins to fix

                    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 is_alias_for has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def is_alias_for # :nodoc:
                        case @is_alias_for
                        when RDoc::MethodAttr then
                          @is_alias_for
                        when Array then
                    Severity: Minor
                    Found in lib/rdoc/code_object/any_method.rb - About 35 mins to fix

                    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 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
                    Severity: Minor
                    Found in lib/rdoc/generator/darkfish.rb - About 35 mins to fix

                    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 = []
                    
                    
                    Severity: Minor
                    Found in lib/rdoc/stats.rb - About 35 mins to fix

                    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] <=>
                    Severity: Minor
                    Found in lib/rdoc/code_object/method_attr.rb - About 35 mins to fix

                    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
                    
                    
                    Severity: Minor
                    Found in lib/rdoc/rdoc.rb - About 35 mins to fix

                    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_date has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def parse_date(date)
                        case date
                        when /\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/
                          Time.new($1, $2, $3, $4, $5, $6, ("#{$7}:#{$8}" if $7))
                        when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/
                    Severity: Minor
                    Found in lib/rdoc/parser/changelog.rb - About 35 mins to fix

                    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 each has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def self.each system = true, site = true, home = true, gems = :latest, *extra_dirs # :yields: directory, type
                        return enum_for __method__, system, site, home, gems, *extra_dirs unless
                          block_given?
                    
                        extra_dirs.each do |dir|
                    Severity: Minor
                    Found in lib/rdoc/ri/paths.rb - About 35 mins to fix

                    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_symbol_in_arg has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def parse_symbol_in_arg
                        tk = get_tk
                        if :on_symbol == tk[:kind] then
                          tk[:text].sub(/^:/, '')
                        elsif :on_tstring == tk[:kind] then
                    Severity: Minor
                    Found in lib/rdoc/parser/ruby.rb - About 35 mins to fix

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language