bbatsov/rubocop

View on GitHub

Showing 647 of 687 total issues

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

        def apply_autocorrect(corrector, node, rhs, operator, new_rhs)
Severity: Minor
Found in lib/rubocop/cop/style/self_assignment.rb - About 35 mins to fix

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

            def autocorrect(corrector, node, sort_node, sorter, accessor)
    Severity: Minor
    Found in lib/rubocop/cop/style/redundant_sort.rb - About 35 mins to fix

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

                def move_branch_inside_condition(corrector, branch, condition,
                                                 assignment, column)
      Severity: Minor
      Found in lib/rubocop/cop/style/conditional_assignment.rb - About 35 mins to fix

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

                def preferred_method(operator, lhs, rhs, if_branch, else_branch)
        Severity: Minor
        Found in lib/rubocop/cop/style/min_max_comparison.rb - About 35 mins to fix

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

                    def move_branch_inside_condition(corrector, branch, condition, assignment, column)
          Severity: Minor
          Found in lib/rubocop/cop/style/conditional_assignment.rb - About 35 mins to fix

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

                    def compact_offenses(node, left, right, start_ok, end_ok)
            Severity: Minor
            Found in lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb - About 35 mins to fix

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

                      def correct_key_value(corrector, delta, key, value, separator)
              Severity: Minor
              Found in lib/rubocop/cop/layout/hash_alignment.rb - About 35 mins to fix

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

                        def issue_offenses(node, left, right, start_ok, end_ok)
                Severity: Minor
                Found in lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb - About 35 mins to fix

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

                          def inspect(node, block_argument_node, condition_node, return_value_node, range)
                  Severity: Minor
                  Found in lib/rubocop/cop/style/map_compact_with_conditional_block.rb - About 35 mins to fix

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

                            def check_space(space_begin_pos, space_end_pos, range, msg, node = nil)
                    Severity: Minor
                    Found in lib/rubocop/cop/layout/space_around_block_parameters.rb - About 35 mins to fix

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

                              def check_right_brace(node, inner, left_brace, right_brace, single_line)
                      Severity: Minor
                      Found in lib/rubocop/cop/layout/space_inside_block_braces.rb - About 35 mins to fix

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

                                def autocorrect_line(corrector, line_begin_pos, expr, column_delta,
                                                     taboo_ranges)
                        Severity: Minor
                        Found in lib/rubocop/cop/correctors/alignment_corrector.rb - About 35 mins to fix

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

                                def line_breaks(node, source, previous_line_num, base_line_num, node_index)
                          Severity: Minor
                          Found in lib/rubocop/cop/correctors/percent_literal_corrector.rb - About 35 mins to fix

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

                                  def wrap_contents(corrector, node, contents, char, delimiters)
                            Severity: Minor
                            Found in lib/rubocop/cop/correctors/percent_literal_corrector.rb - About 35 mins to fix

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

                                      def empty_corrections(processed_source, corrector, empty_config,
                                                            left_token, right_token)
                              Severity: Minor
                              Found in lib/rubocop/cop/correctors/space_corrector.rb - About 35 mins to fix

                                Method start has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                      def start
                                        @reader.read do |request|
                                          if !request.key?(:method)
                                            @routes.handle_method_missing(request)
                                          elsif (route = @routes.for(request[:method]))
                                Severity: Minor
                                Found in lib/rubocop/lsp/server.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 excludes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                      def excludes(offending_files, cop_name, parent)
                                        # Exclude properties in .rubocop_todo.yml override default ones, as well as any custom
                                        # excludes in .rubocop.yml, so in order to retain those excludes we must copy them.
                                        # There can be multiple .rubocop.yml files in subdirectories, but we just look at the
                                        # current working directory.
                                Severity: Minor
                                Found in lib/rubocop/formatter/disabled_config_formatter.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 detected_styles_for_column has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                      def detected_styles_for_column(column, left_parenthesis, left_brace)
                                        styles = []
                                        if column == (left_brace.source_line =~ /\S/)
                                          styles << :consistent
                                          styles << :special_inside_parentheses unless left_parenthesis
                                Severity: Minor
                                Found in lib/rubocop/cop/mixin/multiline_element_indentation.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 reposition has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                      def reposition(src, pos, step, include_newlines: false)
                                        offset = step == -1 ? -1 : 0
                                        pos += step while SINGLE_SPACE_REGEXP.match?(src[pos + offset]) ||
                                                          (include_newlines && src[pos + offset] == "\n")
                                        pos.negative? ? 0 : pos
                                Severity: Minor
                                Found in lib/rubocop/cop/mixin/surrounding_space.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 version has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    def self.version(debug: false, env: nil)
                                      if debug
                                        verbose_version = format(MSG, version: STRING, parser_version: parser_version,
                                                                      rubocop_ast_version: RuboCop::AST::Version::STRING,
                                                                      target_ruby_version: target_ruby_version(env),
                                Severity: Minor
                                Found in lib/rubocop/version.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