rubinius/rubinius

View on GitHub
core/alpha.rb

Summary

Maintainability
C
1 day
Test Coverage

File alpha.rb has 391 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class NilClass
  def nil?
    true
  end

Severity: Minor
Found in core/alpha.rb - About 5 hrs to fix

    Class Module has 22 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Module
      def method_table   ; @method_table ; end
      def constant_table ; @constant_table ; end
      def name           ; @module_name.to_s ; end
      def origin         ; @origin ; end
    Severity: Minor
    Found in core/alpha.rb - About 2 hrs to fix

      Method alias_method has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

        def alias_method(new_name, current_name)
          Rubinius::VM.reset_method_cache self, new_name
      
          # If we're aliasing a method we contain, just reference it directly, no
          # need for the alias wrapper
      Severity: Minor
      Found in core/alpha.rb - About 1 hr 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 store has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def store(name, method_id, exec, scope, serial, visibility)
      Severity: Minor
      Found in core/alpha.rb - About 45 mins to fix

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

            def alias(name, visibility, original_name, original_exec, original_mod)
        Severity: Minor
        Found in core/alpha.rb - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status