Foodcritic / foodcritic

Lint tool for Chef cookbooks.
http://foodcritic.io
MIT License
407 stars 153 forks source link

FC 11.4.0 - FC086 False positive #685

Closed stefanwb closed 6 years ago

stefanwb commented 7 years ago

Foodcritic 11.4.0 throws an FC086 for these lines:

encrypted_item = Chef::EncryptedDataBagItem.encrypt_data_bag_item(original_item, Chef::EncryptedDataBagItem.load_secret)

and

bag = Chef::DataBagItem.new

These methods do not load items from a data bag but still trigger mentioned rule.

tas50 commented 6 years ago

@stefanwb Thanks for the specific examples. I updated FC086 and used your examples in the specs to make sure we don't regress this in the future.

Fixed by https://github.com/Foodcritic/foodcritic/pull/696