Myoldmopar/decent_ci

View on GitHub

Showing 50 of 71 total issues

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

  def initialize(filename, linenumber, colnumber, messagetype, message)
Severity: Minor
Found in lib/codemessage.rb - About 35 mins to fix

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

      def process_cmake_results(src_dir, build_dir, stderr, cmake_exit_code, is_package)
    Severity: Minor
    Found in lib/resultsprocessor.rb - About 35 mins to fix

      Method which has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        def which(cmd, extra_paths = nil)
          exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
          path_array = ENV['PATH'].split(File::PATH_SEPARATOR)
          path_array.concat(extra_paths) unless extra_paths.nil?
      
      
      Severity: Minor
      Found in lib/configuration.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 parse_error_messages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        def parse_error_messages(src_dir, build_dir, output)
          results = []
          output.encode('UTF-8', :invalid => :replace).split("\n").each do |l|
            msg = parse_gcc_line(src_dir, build_dir, l)
            msg = parse_msvc_line(src_dir, build_dir, l) if msg.nil?
      Severity: Minor
      Found in lib/resultsprocessor.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 get_short_form has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        def get_short_form(str)
          return nil if str.nil?
      
          if str.length <= 10 && str =~ /[a-zA-Z]/
            str
      Severity: Minor
      Found in lib/potentialbuild.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 get_regression_base has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        def get_regression_base(t_potential_build)
          config = t_potential_build.configuration
          defined_baseline = config.send("regression_baseline_#{t_potential_build.branch_name}")
      
          default_baseline = config.regression_baseline_default
      Severity: Minor
      Found in lib/build.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 initialize has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        def initialize(client, token, repository, tag_name, commit_sha, branch_name, author, release_url, release_assets, # rubocop:disable Metrics/ParameterLists
                       pull_id, pr_base_repository, pr_base_ref)
          @client = client
          @config = load_configuration(repository, (tag_name.nil? ? commit_sha : tag_name), !release_url.nil?)
          @config.repository_name = github_query(@client) { @client.repo(repository).name }
      Severity: Minor
      Found in lib/potentialbuild.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 load_yaml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        def load_yaml(name, this_location, this_ref)
          return nil if this_location.nil? || name.nil?
      
          begin
            content = @client.content(this_location, :path => name, :ref => this_ref)
      Severity: Minor
      Found in lib/configuration.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 process_python_results has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        def process_python_results(src_dir, build_dir, stdout, stderr, python_exit_code)
          results = []
          stdout.encode('UTF-8', :invalid => :replace).split("\n").each do |err|
            msg = parse_python_or_latex_line(src_dir, build_dir, err)
            results << msg unless msg.nil?
      Severity: Minor
      Found in lib/resultsprocessor.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 relative_path has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        def relative_path(path, src_dir, build_dir)
          Pathname.new("#{src_dir}/#{path}").realpath.relative_path_from(Pathname.new(this_src_dir).realdirpath)
        rescue
          begin
            Pathname.new("#{build_dir}/#{path}").realpath.relative_path_from(Pathname.new(this_src_dir).realdirpath)
      Severity: Minor
      Found in lib/resultsprocessor.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