rubinius/rubinius

View on GitHub
configure.rb

Summary

Maintainability
F
2 wks
Test Coverage

File configure.rb has 1749 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require './rakelib/configure'
require './rakelib/release'
require './rakelib/build_signature'
require 'rbconfig'
require 'tempfile'
Severity: Major
Found in configure.rb - About 4 days to fix

    Class Configure has 82 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Configure
    
      # Default settings only. All code that may depend on user-selected options
      # must run after options are processed.
      def initialize(root)
    Severity: Major
    Found in configure.rb - About 1 day to fix

      Method write_configure_files has 197 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def write_configure_files
          @log.write "\nWriting configuration files..."
      
          @bin_links.delete @program_name
      
      
      Severity: Major
      Found in configure.rb - About 7 hrs to fix

        Method options has 169 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def options
            @options = Rubinius::Options.new "Usage: configure [options]", 30
            o = @options
            o.left_align
        
        
        Severity: Major
        Found in configure.rb - About 6 hrs to fix

          Method set_filesystem_paths has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
          Open

            def set_filesystem_paths
              @prefixdir = @prefixdir ? expand_install_dir(@prefixdir) : @sourcedir
          
              if @appdir
                dir = expand_install_dir @appdir
          Severity: Minor
          Found in configure.rb - About 5 hrs 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 check_tools has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
          Open

            def check_tools
              @cc ||= ENV['CC'] || default_cc
              @cxx ||= ENV['CXX'] || default_cxx
          
              check_tool_version @cc, '-dumpversion', [4, 1]
          Severity: Minor
          Found in configure.rb - About 4 hrs 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 setup_llvm has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
          Open

            def setup_llvm
              @log.print "  Checking for 'llvm-config': "
          
              config = @llvm_configure
              if !config
          Severity: Minor
          Found in configure.rb - About 4 hrs 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 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def initialize(root)
              @log = Logger.new "configure.log"
          
              @command_line = ARGV.dup
              @log.log "Command line: #{@command_line.join(" ").inspect}"
          Severity: Major
          Found in configure.rb - About 3 hrs to fix

            Method write_configure_files has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
            Open

              def write_configure_files
                @log.write "\nWriting configuration files..."
            
                @bin_links.delete @program_name
            
            
            Severity: Minor
            Found in configure.rb - About 3 hrs 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 detect_functions has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
            Open

              def detect_functions
                if has_function("clock_gettime", ["time.h"])
                  @defines << "HAVE_CLOCK_GETTIME"
                end
            
            
            Severity: Minor
            Found in configure.rb - About 3 hrs 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 download has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
            Open

              def download(url, full_path, follows=0)
                begin
                  dir = File.dirname full_path
                  Dir.mkdir dir unless File.exist? dir
            
            
            Severity: Minor
            Found in configure.rb - About 2 hrs 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 detect_functions has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def detect_functions
                if has_function("clock_gettime", ["time.h"])
                  @defines << "HAVE_CLOCK_GETTIME"
                end
            
            
            Severity: Major
            Found in configure.rb - About 2 hrs to fix

              Method setup_platform has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def setup_platform
                  @ldsharedxx = "#{@cxx} -shared"
                  @ldshared   = "#{@cc} -shared"
              
                  @include_dirs.each do |d|
              Severity: Major
              Found in configure.rb - About 2 hrs to fix

                Method unpack_gems has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                  def unpack_gems(source, destination, list)
                    FileUtils.mkdir_p destination unless File.directory? destination
                
                    Dir.chdir destination do
                      list.each do |name|
                Severity: Minor
                Found in configure.rb - About 2 hrs 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 run has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def run
                    unless ENV["RBX_SUPRESS_DEPRECATION"]
                      @log.deprecated "\n\n'configure' is deprecated and will be removed in the future.\n" \
                        "Use 'build.sh' to configure, build, package, and install Rubinius.\n\n\n"
                    end
                Severity: Major
                Found in configure.rb - About 2 hrs to fix

                  Method detect_headers has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                  Open

                    def detect_headers
                      unless @features["vendor-zlib"].value
                        unless has_header("zlib.h")
                          failure "zlib.h is required"
                        end
                  Severity: Minor
                  Found in configure.rb - About 2 hrs 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_filesystem_paths has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def set_filesystem_paths
                      @prefixdir = @prefixdir ? expand_install_dir(@prefixdir) : @sourcedir
                  
                      if @appdir
                        dir = expand_install_dir @appdir
                  Severity: Major
                  Found in configure.rb - About 2 hrs to fix

                    Method download has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def download(url, full_path, follows=0)
                        begin
                          dir = File.dirname full_path
                          Dir.mkdir dir unless File.exist? dir
                    
                    
                    Severity: Major
                    Found in configure.rb - About 2 hrs to fix

                      Method setup_llvm has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def setup_llvm
                          @log.print "  Checking for 'llvm-config': "
                      
                          config = @llvm_configure
                          if !config
                      Severity: Minor
                      Found in configure.rb - About 1 hr to fix

                        Method check_tools has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def check_tools
                            @cc ||= ENV['CC'] || default_cc
                            @cxx ||= ENV['CXX'] || default_cxx
                        
                            check_tool_version @cc, '-dumpversion', [4, 1]
                        Severity: Minor
                        Found in configure.rb - About 1 hr to fix

                          Method detect_headers has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            def detect_headers
                              unless @features["vendor-zlib"].value
                                unless has_header("zlib.h")
                                  failure "zlib.h is required"
                                end
                          Severity: Minor
                          Found in configure.rb - About 1 hr to fix

                            Method process has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def process
                                set_system_commands
                            
                                enable_features
                                detect_build_dirs
                            Severity: Minor
                            Found in configure.rb - About 1 hr to fix

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

                                def run
                                  unless ENV["RBX_SUPRESS_DEPRECATION"]
                                    @log.deprecated "\n\n'configure' is deprecated and will be removed in the future.\n" \
                                      "Use 'build.sh' to configure, build, package, and install Rubinius.\n\n\n"
                                  end
                              Severity: Minor
                              Found in configure.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 options has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def options
                                  @options = Rubinius::Options.new "Usage: configure [options]", 30
                                  o = @options
                                  o.left_align
                              
                              
                              Severity: Minor
                              Found in configure.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 setup_codedb has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def setup_codedb
                                  @log.write "\nSetting up CodeDB..."
                              
                                  dir = "#{@builddir}#{@codedbdir}"
                                  codedb_cache = "#{dir}/cache"
                              Severity: Minor
                              Found in configure.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 setup_codetools has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def setup_codetools
                                  @log.write "\nSetting up codetools..."
                              
                                  codetools_cache = "rubinius-codetools-cache"
                                  cache_bzip = "#{codetools_cache}.bz2"
                              Severity: Minor
                              Found in configure.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 setup_stdlib has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                def setup_stdlib
                                  @log.write "\nSetting up stdlib..."
                              
                                  stdlib_cache = "rubinius-stdlib-cache"
                                  cache_bzip = "#{stdlib_cache}.bz2"
                              Severity: Minor
                              Found in configure.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 check_program has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def check_program(run=true, *arguments)
                                  begin
                                    basename = "rbx-configure-test"
                                    source   = basename + ".cpp"
                                    File.open source, "wb" do |f|
                              Severity: Minor
                              Found in configure.rb - About 1 hr to fix

                                Method detect_libc_name has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def detect_libc_name
                                    return if @libc
                                
                                    @log.print "Checking for libc version: "
                                
                                
                                Severity: Minor
                                Found in configure.rb - About 55 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 fetch_gems has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def fetch_gems
                                    @log.write "\nFetching gems..."
                                    failed = false
                                
                                    Dir.chdir @gems_cache do
                                Severity: Minor
                                Found in configure.rb - About 55 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 detect_features has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                  def detect_features
                                    # Default on *BSD is no execinfo
                                    if @bsd and @features["execinfo"].configured.nil?
                                      @features["execinfo"].configured = false
                                    end
                                Severity: Minor
                                Found in configure.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

                                Avoid too many return statements within this method.
                                Open

                                    return true
                                Severity: Major
                                Found in configure.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                        return false
                                  Severity: Major
                                  Found in configure.rb - About 30 mins to fix

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

                                      def get_system_name
                                        return unless @os =~ /linux/
                                        return unless File.exist? "/etc/issue"
                                    
                                        data = IO.readlines("/etc/issue").first
                                    Severity: Minor
                                    Found in configure.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

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def setup_codetools
                                        @log.write "\nSetting up codetools..."
                                    
                                        codetools_cache = "rubinius-codetools-cache"
                                        cache_bzip = "#{codetools_cache}.bz2"
                                    Severity: Major
                                    Found in configure.rb and 1 other location - About 1 hr to fix
                                    configure.rb on lines 2040..2060

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 62.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def setup_stdlib
                                        @log.write "\nSetting up stdlib..."
                                    
                                        stdlib_cache = "rubinius-stdlib-cache"
                                        cache_bzip = "#{stdlib_cache}.bz2"
                                    Severity: Major
                                    Found in configure.rb and 1 other location - About 1 hr to fix
                                    configure.rb on lines 2065..2085

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 62.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def detect_tr1
                                        @log.print "Checking for tr1: "
                                    
                                        status = check_program(false) do |f|
                                          src = <<-EOP
                                    Severity: Minor
                                    Found in configure.rb and 1 other location - About 25 mins to fix
                                    configure.rb on lines 1011..1029

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 29.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def detect_tr1_hash
                                        @log.print "Checking for tr1/hash definition: "
                                    
                                        status = check_program(false) do |f|
                                          src = <<-EOP
                                    Severity: Minor
                                    Found in configure.rb and 1 other location - About 25 mins to fix
                                    configure.rb on lines 992..1009

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 29.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def detect_aarch64
                                        print "Checking for aarch64: "
                                    
                                        status = check_program do |f|
                                          src = <<-EOP
                                    Severity: Minor
                                    Found in configure.rb and 1 other location - About 15 mins to fix
                                    configure.rb on lines 1031..1051

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 26.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                    Open

                                      def detect_x86
                                        print "Checking for x86_64: "
                                    
                                        status = check_program do |f|
                                          src = <<-EOP
                                    Severity: Minor
                                    Found in configure.rb and 1 other location - About 15 mins to fix
                                    configure.rb on lines 1053..1073

                                    Duplicated Code

                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                    Tuning

                                    This issue has a mass of 26.

                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                    Refactorings

                                    Further Reading

                                    There are no issues that match your filters.

                                    Category
                                    Status