Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

FC007 false positive when cookbooks are in a thing that 'looks' like a cookbook #738

Open
richardc opened this issue Feb 28, 2018 · 0 comments

Comments

@richardc
Copy link
Contributor

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.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant