Using any local hash in an attributes file seems to trigger this:
data = {}
# process each specified file
{}.each do |name, filepath|
# specify the default hash first
data[name] = {}
# skip if the file doesn't exist (could be Internap host)
next unless File.exists?(filepath)
Chef::Log.info("Processing file: #{filepath}")
File.open(filepath).readlines.each do |line|
k, v = line.strip.split('=', 2)
data[name][k] = v # THIS LINE TRIGGERS FC044
end
end
default['ape'] = data
yields this:
FC044: Avoid bare attribute keys: /tmp/foo/attributes/test.rb:18
Using any local hash in an attributes file seems to trigger this:
yields this: