BigKeeper/big-keeper

View on GitHub

Showing 82 of 109 total issues

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

    def pull(path, user, module_name, home_branch_name, type)
Severity: Minor
Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

        def finish(path, user, module_name, home_branch_name, type)
    Severity: Minor
    Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

          def add(path, user, module_name, name, type)
      Severity: Minor
      Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

          def self.release_module_start(path, version, user, module_name, ignore)
        Severity: Minor
        Found in lib/big_keeper/command/release/module.rb - About 35 mins to fix

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

              def rebase(path, user, module_name, home_branch_name, type)
          Severity: Minor
          Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                def publish(path, user, module_name, home_branch_name, type)
            Severity: Minor
            Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                  def switch_to(path, user, module_name, home_branch_name, type)
              Severity: Minor
              Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                    def pre_publish(path, user, module_name, home_branch_name, type)
                Severity: Minor
                Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                      def verify_module(path, user, module_name, home_branch_name, type)
                  Severity: Minor
                  Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                        def del(path, user, module_name, name, type)
                    Severity: Minor
                    Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                          def release_finish(path, user, modules, module_name, version)
                      Severity: Minor
                      Found in lib/big_keeper/service/module_service.rb - About 35 mins to fix

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

                          def chose_version(cur_version,temp_version)
                            # p "cur:#{cur_version},temp:#{temp_version}"
                            cur_list = cur_version.split('.')
                            temp_list = temp_version.split('.')
                            temp_list << 0.to_s if temp_list.size == 2
                        Severity: Minor
                        Found in lib/big_keeper/util/podfile_detector.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 find_lastest_tag has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def find_lastest_tag(module_name)
                              username = FileOperator.new.current_username
                              tags_repos_pwd = Array.new
                              tags_spec_list = Array.new
                              tags_module_list = Array.new
                        Severity: Minor
                        Found in lib/big_keeper/dependency/dep_pod_operator.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 check_remote_branch_diff has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def check_remote_branch_diff(path, branch, compare_branch)
                              fetch(path)
                              compare_branch_commits = Array.new
                              IO.popen("cd '#{path}';git log --left-right #{branch}...origin/#{compare_branch} --pretty=oneline") do |io|
                                io.each do |line|
                        Severity: Minor
                        Found in lib/big_keeper/util/git_operator.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 release_start has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          def self.release_start(path, version, user, modules)
                            BigkeeperParser.parse("#{path}/Bigkeeper")
                            version = BigkeeperParser.version if version == 'Version in Bigkeeper file'
                            modules = release_check_changed_modules(path, user) if (modules.nil? || modules.empty?)
                        
                        
                        Severity: Minor
                        Found in lib/big_keeper/command/release/start.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 release_finish has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          def self.release_finish(path, version, user, modules)
                            BigkeeperParser.parse("#{path}/Bigkeeper")
                            version = BigkeeperParser.version if version == 'Version in Bigkeeper file'
                            modules = release_check_changed_modules(path, user) if (modules.nil? || modules.empty?)
                        
                        
                        Severity: Minor
                        Found in lib/big_keeper/command/release/finish.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 verify_checkout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def verify_checkout(path, branch_name)
                              Dir.chdir(path) do
                                cmd = "git checkout -b #{branch_name}"
                                if GitOperator.new.has_branch(path, branch_name)
                                  cmd = "git checkout #{branch_name}"
                        Severity: Minor
                        Found in lib/big_keeper/service/git_service.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 module_path has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def self.module_path(user_name, module_name)
                              if @@config[:users] \
                                && @@config[:users][user_name] \
                                && @@config[:users][user_name][:mods] \
                                && @@config[:users][user_name][:mods][module_name] \
                        Severity: Minor
                        Found in lib/big_keeper/util/bigkeeper_parser.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 already_in_process? has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def self.already_in_process?
                              already_in_process = false
                              Open3.popen3('ps aux | grep \<big\> -c') do |stdin , stdout , stderr, wait_thr|
                                while line = stdout.gets
                                  if line.rstrip.to_i > 2
                        Severity: Minor
                        Found in lib/big_keeper/util/verify_operator.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 check_diff has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            def check_diff(path, branch, compare_branch)
                              compare_branch_commits = Array.new
                              IO.popen("cd '#{path}'; git log --left-right #{branch}...#{compare_branch} --pretty=oneline") do |io|
                                io.each do |line|
                                  compare_branch_commits.push(line) if (line.include? '>') && (line.include? "Merge branch #{branch} into #{compare_branch}")
                        Severity: Minor
                        Found in lib/big_keeper/util/git_operator.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