Showing 2,704 of 2,705 total issues
Avoid more than 4 levels of block nesting. Open
puts "#{nodename} - #{output}" if output.match(/[^\s]/)
- Read upRead up
- Exclude checks
Useless assignment to variable - ebs_key
. Open
ebs_key = MU::Cloud::Azure.storage(credentials: credset).insert_object(
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
newtree['default']['value'] = true if newtree['default']
- Read upRead up
- Exclude checks
Prefer using YAML.safe_load
over YAML.load
. Open
default_cfg.merge!(YAML.load(File.read("/opt/mu/etc/mu.yaml")))
- Read upRead up
- Exclude checks
Do not suppress exceptions. Open
rescue MU::Cloud::MuCloudResourceNotImplemented
- Read upRead up
- Exclude checks
Useless assignment to variable - e
. Open
rescue OpenURI::HTTPError, Timeout::Error, SocketError => e
- Read upRead up
- Exclude checks
Useless assignment to variable - newmap
. Use _
or _newmap
as a variable name to indicate that it won't be used. Open
newtree, newmap = menu(
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
cfg[key][name][subkey] = subdata['value'] if subdata['value']
- Read upRead up
- Exclude checks
Avoid more than 4 levels of block nesting. Open
next if nameentry.nil? or nameentry.match(/^#/)
- Read upRead up
- Exclude checks
Use =~
in places where the MatchData
returned by #match
will not be used. Open
if n.match(/^#{Regexp.quote(pool_name)}-[a-z0-9]{3}$/i)
- Read upRead up
- Exclude checks
Use =~
in places where the MatchData
returned by #match
will not be used. Open
if e.message.match(/User data is limited to (\d+)/)
- Read upRead up
- Exclude checks
File.exists?
is deprecated in favor of File.exist?
. Open
if File.exists?("/opt/opscode/bin/chef-server-ctl")
- Read upRead up
- Exclude checks
Useless assignment to variable - bucket
. Did you mean bucketobj
? Open
bucket = MU::Cloud::Azure.storage(credentials: credset).insert_bucket(
- Read upRead up
- Exclude checks
Unused block argument - k
. If it's necessary, use _
or _k
as an argument name to indicate that it won't be used. Open
map[count.to_s].each_pair { |k, v| v.delete("value") } # use defaults
- 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
$CONFIGURABLES.each_pair { |key, data|
- Read upRead up
- Exclude checks
Avoid rescuing the Exception
class. Perhaps you meant to rescue StandardError
? Open
rescue Exception => e MU.log e.inspect, MU::ERR, details: e.backtrace exit 1
- Read upRead up
- Exclude checks