kigster/arli

View on GitHub

Showing 26 of 26 total issues

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

      def install
        ___ "#{library.name.blue.bold} "
        if library.nil? && library.library.nil?
          ___ ' (no library) '
          fuck
Severity: Minor
Found in lib/arli/library/installer.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 execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def execute
        find_source_files

        # so "dir" is the 'Adafruit_Unified_Sensor'
        # but we found header Adafruit_Sensor we should
Severity: Minor
Found in lib/arli/actions/dir_name.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 arli_library_path has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

          def arli_library_path
            if library_path.start_with?('/')
              library_path.to_s
            elsif library_path.start_with?('~')
              "$ENV{HOME}#{library_path[1..-1]}"
Severity: Minor
Found in lib/arli/lock/formats/template/cmake_renderer.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 set_canonical_dir! has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def set_canonical_dir!(canonical_dir)
        if canonical_dir && canonical_dir != dir
          # if they are match case insensitively, we may be
          # on a mac where these are considered the same
          if dir =~ /^#{canonical_dir}$/i
Severity: Minor
Found in lib/arli/actions/dir_name.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 execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def execute
        return if library.url.nil?
        return if library.url !~ /\.zip$/i

        download!
Severity: Minor
Found in lib/arli/actions/unzip_file.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 report_exception has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def report_exception(e, header = nil)
        if header
          __pf header.bold.yellow + ': '
        else
          __pf 'Error: '.bold.red
Severity: Minor
Found in lib/arli/helpers/output.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