jonlives / knife-spork

A workflow plugin to help many devs work with cookbooks and environments at once
Other
335 stars 97 forks source link

Foodcritic plugin ignores .foodcritic file #214

Open alcasim opened 7 years ago

alcasim commented 7 years ago

I have added an exception into .foodcritic file in order to disable notification when a certain rule fails. Checking the cookbook with knife spork and the foodcritic plugin enabled alerts about the offending rule, although the exception is included.

outputs: cat .foodcritic ~FC078

when knife spork checks: /Users/acasimiro/workingCopies/code/bitbucket/chef-cookbooks/ptc-chef-server ERROR: Foodcritic failed! ERROR: FC078: Ensure cookbook shared under an OSI-approved open source license:

Should I do anything to force knife spork to use the .foodcritic file?

luisdavim commented 7 years ago

I've looked into the foodcritic's code and it should be loading that file: https://github.com/Foodcritic/foodcritic/blob/master/lib/foodcritic/linter.rb#L204

luisdavim commented 7 years ago

I've made some tests and it I had the following in my configuration:

plugins:
  foodcritic:
    tags: ['any']

replacing it with:

plugins:
  foodcritic:
    epic_fail: true

makes spork respect the .foodcritic file is this expected behavior?

jonlives commented 7 years ago

This is indeed not expected behaviour - I'll take a look! Thanks for the report!