rubinius/rubinius

View on GitHub

Showing 1,321 of 1,541 total issues

Avoid too many return statements within this method.
Open

          return @tuple.at(@start + start_idx)
Severity: Major
Found in core/array.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

          return new_range(0, 0) if start_idx == @total
    Severity: Major
    Found in core/array.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

          return nil if start_idx < 0
      Severity: Major
      Found in core/array.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return false
        Severity: Major
        Found in core/code_loader.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                    return nil
          Severity: Major
          Found in core/array.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return self[idx.to_sym]
            Severity: Major
            Found in core/match_data.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                    return 1
              Severity: Major
              Found in core/object_space.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return @source.byteslice(x, y-x)
                Severity: Major
                Found in core/match_data.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return false unless self_tuple[self_idx] == other_tuple[other_idx]
                  Severity: Major
                  Found in core/array.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                              return nil
                    Severity: Major
                    Found in core/match_data.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                            return count == size ? result : result[0, count]
                      Severity: Major
                      Found in core/array.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                            return to_a[idx]
                        Severity: Major
                        Found in core/match_data.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                    return result
                          Severity: Major
                          Found in core/array.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return val if val
                            Severity: Major
                            Found in core/match_data.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                    return find_object([:kind_of, what], block)
                              Severity: Major
                              Found in core/object_space.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                      return [at(i), at(j)]
                                Severity: Major
                                Found in core/array.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                        return nil
                                  Severity: Major
                                  Found in core/integer.rb - About 30 mins to fix

                                    Method gem_requires has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                      def gem_requires name, options # :nodoc:
                                        if options.include? :require then
                                          if requires = options.delete(:require) then
                                            @requires[name].concat Array requires
                                          end
                                    Severity: Minor
                                    Found in library/rubygems/request_set/gem_dependency_api.rb - About 25 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 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                          def each
                                            return enum_for unless block_given?
                                            action = @first_action
                                            loop do
                                              break unless action

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

                                          def reverse_each
                                            return enum_for(:reverse_each) unless block_given?
                                            action = @current_action
                                            loop do
                                              break unless action

                                    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