Showing 2,704 of 2,705 total issues
Do not suppress exceptions. Open
rescue OpenURI::HTTPError, Timeout::Error, SocketError, Errno::ENETUNREACH
- Read upRead up
- Exclude checks
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")
- Read upRead up
- Exclude checks
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|
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
subdata["value"] = newval if !newval.nil?
- Read upRead up
- Exclude checks
Use =~
in places where the MatchData
returned by #match
will not be used. Open
repo.match(/^([^@]+?)@([^:]+?):/)
- Read upRead up
- Exclude checks
Use =~
in places where the MatchData
returned by #match
will not be used. Open
repo.match(/\/([^\/]+?)(\.git)?$/)
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks
Unused method argument - noop
. Open
def runCommand(deploys = MU::MommaCat.listDeploys, nodes = [], cmd = nil, print_output: $opts[:verbose], noop: false)
- Read upRead up
- Exclude checks
Use =~
in places where the MatchData
returned by #match
will not be used. Open
if e.message.match(/notFound:/)
- Read upRead up
- Exclude checks
Useless assignment to variable - nat_ssh_key
. Open
nat_ssh_key = $opts[:key]
- Read upRead up
- Exclude checks
Useless assignment to variable - bucket
. Did you mean bucketobj
? Open
bucket = MU::Cloud::Azure.storage(credentials: credset).get_bucket(bucketname)
- Read upRead up
- Exclude checks
Useless assignment to variable - data
. Open
data = MU::Groomer::Chef.getSecret(
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
puts "\n\n" if addnewline
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
if tree[parentname]['subtree']['#entries'].size == 1 end
- Read upRead up
- Exclude checks
Use tr
instead of gsub
. Open
subdata['cli-opt'] = (key+"-"+subkey).gsub(/_/, "-")
- Read upRead up
- Exclude checks
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
- Read upRead up
- Exclude checks