Showing 109 of 109 total issues
Method find_and_lock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def find_and_lock(podfile, dictionary) temp_file = Tempfile.new('.Podfile.tmp', :encoding => 'UTF-8') begin File.open(podfile, 'r') do |file| file.each_line do |line|
- Read upRead up
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] \
- Read upRead up
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?)
- Read upRead up
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
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if !(((next_char<='z'&&next_char>='a')||(next_char<='Z'&&next_char>='A')||(next_char<='9'&&next_char>='0')||next_char=='_')||((last_char<='z'&&last_char>='a')||(last_char<='Z'&&last_char>='A')||(last_char<='9'&&last_char>='0')||last_char=='_'))
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
c.command :content do | content | content.action do | global_options, options, args | LeanCloudLogger.instance.set_command("image/content") path = File.expand_path(global_options[:path]) BigResources::ImageAnalyzeUtil.get_duplicate_content_file_with_type(path, BigResources::PNG)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
c.command :name do | name | name.action do | global_options, options, args | LeanCloudLogger.instance.set_command("image/name") path = File.expand_path(global_options[:path])
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if !git.has_branch(path, branch_name) Logger.error(%(Can't find a branch named '#{branch_name}'. Use 'start' please)) end if git.current_branch(path) != branch_name Logger.error(%(Current branch is not '#{branch_name}'. Use 'switch' please))
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
if !git.has_branch(path, branch_name) Logger.error(%(Can't find a branch named '#{branch_name}'. Use 'start' please)) end if git.current_branch(path) == branch_name Logger.error(%(Current branch is '#{branch_name}' already. Use 'update' please))
- Read upRead up