-
Notifications
You must be signed in to change notification settings - Fork 153
FC007 should not be triggered by include_recipe "#{cookbook_name}::blah" #44
Comments
Hi Mark, Thanks for raising this - I can confirm the bug and will have a look into it this evening. Cheers, Andrew. |
It looks like the included recipe name turns into just "::recipe" by the time the ast is built, so grepping out '^::' works, but I don't understand why that is the case. |
The There is a test to check that FC007 doesn't wrongly warn on embedded expressions but the scenario is testing with a dynamic recipe_name rather than the cookbook_name. It would be good to have scenarios to test:
We could optionally add specific support for resolving If you feel like having a go at making these changes please let me know. |
Hi Mark, The fix for this was released in foodcritic 1.4.0. Can you test and let me know if this is still a problem? Thanks, Andrew. |
Looks good. Thanks! On Fri, Jun 15, 2012 at 7:14 PM, Andrew Crump <
Mark J. Reed [email protected] |
Thank you sir. |
To include another recipe from the current cookbook, I always use this syntax:
include_recipe "#{cookbook_name}::other"
, to avoid hard-coding the cookbook name in the recipe code. This incorrectly triggers an FC007.The text was updated successfully, but these errors were encountered: