BigKeeper/big-keeper

View on GitHub

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|
Severity: Minor
Found in lib/big_keeper/util/podfile_operator.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 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 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

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=='_'))
Severity: Minor
Found in lib/big_keeper/model/library_model.rb and 1 other location - About 20 mins to fix
lib/big_keeper/model/library_model.rb on lines 89..89

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)
Severity: Minor
Found in lib/big_keeper/command/image.rb and 1 other location - About 15 mins to fix
lib/big_keeper/command/image.rb on lines 9..14

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])
Severity: Minor
Found in lib/big_keeper/command/image.rb and 1 other location - About 15 mins to fix
lib/big_keeper/command/image.rb on lines 19..23

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))
Severity: Minor
Found in lib/big_keeper/service/git_service.rb and 1 other location - About 15 mins to fix
lib/big_keeper/service/git_service.rb on lines 83..87

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))
Severity: Minor
Found in lib/big_keeper/service/git_service.rb and 1 other location - About 15 mins to fix
lib/big_keeper/service/git_service.rb on lines 90..94
Severity
Category
Status
Source
Language