mgleon08/rorr

View on GitHub

Showing 7 of 106 total issues

Method start has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def start
      system 'clear'
      UI.puts "\nWelcome to #{'"Make all tests pass"'.light_cyan}"
      UI.puts "Let's check how much do you proficiency in ruby or rails\n"
      Score.start
Severity: Minor
Found in lib/rorr/test_pass.rb - About 1 hr to fix

    Method start has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def start
          system 'clear'
          UI.puts "\nWelcome to #{"\"Don't ask me Ruby or Rails\"".light_cyan}"
          UI.puts "Let's check whether you remember where Ruby ends and Rails\n"
          Score.start
    Severity: Minor
    Found in lib/rorr/dont_ask_me.rb - About 1 hr to fix

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

          def start
            system 'clear'
            UI.puts "\nWelcome to #{'"Make all tests pass"'.light_cyan}"
            UI.puts "Let's check how much do you proficiency in ruby or rails\n"
            Score.start
      Severity: Minor
      Found in lib/rorr/test_pass.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 start has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def start
            system 'clear'
            UI.puts "\nWelcome to #{"\"What's the return value?\"".light_cyan}"
            UI.puts "Let's check how much do you proficiency in ruby or rails\n"
            Score.start
      Severity: Minor
      Found in lib/rorr/return_value.rb - About 1 hr to fix

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

            def start
              system 'clear'
              UI.puts "\nWelcome to #{"\"Don't ask me Ruby or Rails\"".light_cyan}"
              UI.puts "Let's check whether you remember where Ruby ends and Rails\n"
              Score.start
        Severity: Minor
        Found in lib/rorr/dont_ask_me.rb - About 45 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 start has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            def start
              system 'clear'
              UI.puts "\nWelcome to #{"\"What's the return value?\"".light_cyan}"
              UI.puts "Let's check how much do you proficiency in ruby or rails\n"
              Score.start
        Severity: Minor
        Found in lib/rorr/return_value.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 choose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

              def choose
                system 'clear'
                UI.menu
                while Config.topic = UI.gets
                  case Config.topic
        Severity: Minor
        Found in lib/rorr/main.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

        Severity
        Category
        Status
        Source
        Language