cloudamatic/mu

View on GitHub

Showing 2,704 of 2,705 total issues

Do not suppress exceptions.
Open

rescue OpenURI::HTTPError, Timeout::Error, SocketError, Errno::ENETUNREACH
Severity: Minor
Found in bin/mu-configure by rubocop

Do not shadow rescued Exceptions.
Open

rescue LoadError, Gem::MissingSpecError
_system("cd #{MU_BASE}/lib/modules && umask 0022 && /usr/local/ruby-current/bin/bundle install")
require 'bundler'
pwd = Dir.pwd
Dir.chdir(MU_BASE+"/lib/modules")
Severity: Minor
Found in bin/mu-configure by rubocop

Unused block argument - key. If it's necessary, use _ or _key as an argument name to indicate that it won't be used.
Open

tree.each_pair { |key, data|
Severity: Minor
Found in bin/mu-configure by rubocop

Avoid more than 4 levels of block nesting.
Open

subdata["value"] = newval if !newval.nil?
Severity: Minor
Found in bin/mu-configure by rubocop

Use =~ in places where the MatchData returned by #match will not be used.
Open

repo.match(/^([^@]+?)@([^:]+?):/)
Severity: Minor
Found in bin/mu-configure by rubocop

Use =~ in places where the MatchData returned by #match will not be used.
Open

repo.match(/\/([^\/]+?)(\.git)?$/)
Severity: Minor
Found in bin/mu-configure by rubocop

Redundant use of Object#to_s in interpolation.
Open

MU.log "Userdata script too long updating #{nodename} (#{userdata.size.to_s}/#{Regexp.last_match[1]} bytes)", MU::ERR
Severity: Minor
Found in bin/mu-node-manage by rubocop

Unused method argument - noop.
Open

def runCommand(deploys = MU::MommaCat.listDeploys, nodes = [], cmd = nil, print_output: $opts[:verbose], noop: false)
Severity: Minor
Found in bin/mu-node-manage by rubocop

Useless assignment to variable - id.
Open

id = server['instance_id']
Severity: Minor
Found in bin/mu-node-manage by rubocop

Use =~ in places where the MatchData returned by #match will not be used.
Open

if e.message.match(/notFound:/)
Severity: Minor
Found in bin/mu-gcp-setup by rubocop

Useless assignment to variable - nat_ssh_key.
Open

nat_ssh_key = $opts[:key]
Severity: Minor
Found in bin/mu-tunnel-nagios by rubocop

Useless assignment to variable - bucket. Did you mean bucketobj?
Open

bucket = MU::Cloud::Azure.storage(credentials: credset).get_bucket(bucketname)
Severity: Minor
Found in bin/mu-azure-setup by rubocop

end at 915, 4 is not aligned with if at 911, 12.
Open

end
Severity: Minor
Found in bin/mu-configure by rubocop

Useless assignment to variable - data.
Open

data = MU::Groomer::Chef.getSecret(
Severity: Minor
Found in bin/mu-configure by rubocop

Avoid more than 4 levels of block nesting.
Open

puts "\n\n" if addnewline
Severity: Minor
Found in bin/mu-configure by rubocop

Avoid more than 4 levels of block nesting.
Open

if tree[parentname]['subtree']['#entries'].size == 1
end
Severity: Minor
Found in bin/mu-configure by rubocop

Use tr instead of gsub.
Open

subdata['cli-opt'] = (key+"-"+subkey).gsub(/_/, "-")
Severity: Minor
Found in bin/mu-configure by rubocop

Do not suppress exceptions.
Open

rescue Errno::ESRCH
Severity: Minor
Found in bin/mu-node-manage by rubocop

Do not suppress exceptions.
Open

rescue MU::MuError => e
Severity: Minor
Found in bin/mu-node-manage by rubocop

Redundant use of Object#to_s in interpolation.
Open

MU.log "Userdata script too long updating #{pool_name} Launch Config (#{Base64.encode64(userdata).size.to_s}/#{Regexp.last_match[1]} bytes)", MU::ERR
Severity: Minor
Found in bin/mu-node-manage by rubocop
Severity
Category
Status
Source
Language