foodcritic -B omnibus/files/embedded-cookbooks/site reports FC007 violations for include_recipe "site::recipe" in site/recipes/default.rb
I've been able to track it down to the behaviour of cookbook_name - it continues to recurse up the stack of possible names for omnibus/files/embedded-cookbooks/site/recipes/default.rb as files is still in the path, so the cookbook is identified as being omnibus, not site.
foodcritic -B omnibus/files/embedded-cookbooks/site
reports FC007 violations forinclude_recipe "site::recipe"
insite/recipes/default.rb
I've been able to track it down to the behaviour of
cookbook_name
- it continues to recurse up the stack of possible names foromnibus/files/embedded-cookbooks/site/recipes/default.rb
asfiles
is still in the path, so the cookbook is identified as beingomnibus
, notsite
.I have added a failing test to https://github.com/richardc/foodcritic/tree/cookbook_name_bug but the the fix is currently eluding me as the flow of the path walking code is a little confusing to me.