acrmp/foodcritic — Issue #1: Rule FC001 contrary to Opscode recommendation
Author: jtimberman
Created: 2011-12-01 09:02:48+00:00
State: open

While we're not the authoritative source of how you should write cookbooks, we do teach (in our training materials, classes, and documentation) that node attributes should be accessed by quoted string literals rather than Ruby symbols, because it is the principle of least surprise, and will always work, as a key name as a string can contain dashes (while symbols cannot). Not everyone coming to, and using Chef is a Rubyist, and the symbol syntax may be surprising or inconsistent with other languages that use hashes.

https://github.com/acrmp/foodcritic/blob/master/lib/foodcritic/rules.rb#L1-2