-
Notifications
You must be signed in to change notification settings - Fork 153
Foodcritic 13.x.x - Traversed in recipe folder thinking it is another cookbook when recipe named attributes.rb exists #760
Comments
Same issue for "templates" folder name nested under templates folder example: results in FC011 FC031 FC071 for foldername folder |
whoa @knightorc you are right, I had an |
This bug was introduced when I attempted to fix Foodcritic not finding mycookbook/recipe.rb or mycookbook/attribute.rb. I'm going to have to clean up that logic and I have several new failure states to add specs for so I can make sure we always detect the right thing without casting our net too wide. It's surprisingly difficult to get this right. |
@tas50 We're not blocked, as our solution was to rename the recipe in our case. Thanks for all your efforts. It is appreciated. |
Glad to know this is being looked upon, I also followed the approach @knightorc mentioned to get around this. 👍 |
Confirm, same issue here with an
Renaming fixed the issue as workaround |
Problem: `recipe/attributes.rb` causes false positive warnings Solution: rename recipe See: Foodcritic/foodcritic#760
I have the same issue with Foodcritic 15.1.0. I have an attributes recipe in my cookbooks recipe folder. With renaming the recipe, Foodcritic works as expected. I can confirm, that the workaround from @joe4dev works properly. |
This is applicale for attributes/attributes.rb as wellfoodcritic 15.1.0 |
Hit a weird issue today after updating to Foodcritic 13.x.x from 12.3.0
We have a cookbook that defines attributes at the recipe level.
The recipe is called attributes.rb
Foodcritic when testing the cookbook treats the recipes folder as a nested cookbook.
Simply renaming the recipe to foo_attributes.rb causes the cookbook to test fine.
Structure while failing:
Structure working:
The text was updated successfully, but these errors were encountered: