Showing 5 of 5 total issues

Method install has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    def install
      config = Configuration.new
      yield config if block_given?

      namespace 'semmy' do
Severity: Major
Found in lib/semmy/tasks.rb - About 2 hrs to fix

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

          def define
            namespace 'changelog' do
              task 'close_section' do
                version = Project.version
                homepage = Gemspec.homepage
    Severity: Minor
    Found in lib/semmy/tasks/changelog_sections.rb - About 1 hr to fix

      Method define has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            def define
              namespace 'versioning' do
                task 'remove_development_version_suffix' do
                  new_version = VersionString
                    .remove_suffix(Project.version, config.development_version_suffix)
      Severity: Minor
      Found in lib/semmy/tasks/versioning.rb - About 1 hr to fix

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

            def install
              config = Configuration.new
              yield config if block_given?
        
              namespace 'semmy' do
        Severity: Minor
        Found in lib/semmy/tasks.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 define has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

              def define
                task 'lint' => ['lint:install', 'lint:locales']
        
                namespace 'lint' do
                  task 'install' do
        Severity: Minor
        Found in lib/semmy/tasks/lint.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