BigKeeper/big-keeper

View on GitHub

Showing 109 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 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 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_module_finish has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def self.release_module_finish(path, version, user, module_name, spec)
        Severity: Minor
        Found in lib/big_keeper/command/release/module.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

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

            spec.command :list do | list |
            list.action do |global_options, options, args|
            LeanCloudLogger.instance.set_command("spec/list")
             
            path = File.expand_path(global_options[:path])
            Severity: Minor
            Found in lib/big_keeper/command/spec.rb and 2 other locations - About 35 mins to fix
            lib/big_keeper/command/client.rb on lines 14..20
            lib/big_keeper/command/client.rb on lines 24..30

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

            modules.command :list do |list|
            list.action do |global_options, options, args|
            LeanCloudLogger.instance.set_command("spec/list")
            path = File.expand_path(global_options[:path])
            version = global_options[:ver]
            Severity: Minor
            Found in lib/big_keeper/command/client.rb and 2 other locations - About 35 mins to fix
            lib/big_keeper/command/client.rb on lines 24..30
            lib/big_keeper/command/spec.rb on lines 29..37

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

            modules.command :update do |update|
            update.action do |global_options, options, args|
            LeanCloudLogger.instance.set_command("spec/list")
            path = File.expand_path(global_options[:path])
            version = global_options[:ver]
            Severity: Minor
            Found in lib/big_keeper/command/client.rb and 2 other locations - About 35 mins to fix
            lib/big_keeper/command/client.rb on lines 14..20
            lib/big_keeper/command/spec.rb on lines 29..37

            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

            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

            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

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

            if cur_list[0] >= temp_list[0]
            if cur_list[1] >= temp_list[1]
            if cur_list[2] > temp_list[2]
            return cur_version
            end
            Severity: Minor
            Found in lib/big_keeper/util/podfile_detector.rb and 1 other location - About 30 mins to fix
            lib/big_keeper/util/lockfile_parser.rb on lines 131..138

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

            if cur_list[0] >= temp_list[0]
            if cur_list[1] >= temp_list[1]
            if cur_list[2] > temp_list[2]
            return cur_version
            end
            Severity: Minor
            Found in lib/big_keeper/util/lockfile_parser.rb and 1 other location - About 30 mins to fix
            lib/big_keeper/util/podfile_detector.rb on lines 90..97

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

            begin
            File.open(settings_file, 'r') do |file|
            file.each_line do |line|
            temp_file.puts(line)
            end
            Severity: Minor
            Found in lib/big_keeper/util/gradle_file_operator.rb and 2 other locations - About 25 mins to fix
            lib/big_keeper/util/gradle_file_operator.rb on lines 108..119
            lib/big_keeper/util/gradle_file_operator.rb on lines 205..216

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

            begin
            File.open(build_file, 'r') do |file|
            file.each_line do |line|
            temp_file.puts(line)
            end
            Severity: Minor
            Found in lib/big_keeper/util/gradle_file_operator.rb and 2 other locations - About 25 mins to fix
            lib/big_keeper/util/gradle_file_operator.rb on lines 160..171
            lib/big_keeper/util/gradle_file_operator.rb on lines 205..216

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

            begin
            File.open(build_file, 'r') do |file|
            file.each_line do |line|
            temp_file.puts(line)
            end
            Severity: Minor
            Found in lib/big_keeper/util/gradle_file_operator.rb and 2 other locations - About 25 mins to fix
            lib/big_keeper/util/gradle_file_operator.rb on lines 108..119
            lib/big_keeper/util/gradle_file_operator.rb on lines 160..171

            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

            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

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

            def check_push_success(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? 'fatal')
            Severity: Minor
            Found in lib/big_keeper/util/git_operator.rb - About 25 mins to fix

            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
            Severity
            Category
            Status
            Source
            Language