Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foodcritic plugin ignores .foodcritic file #214

Open
alcasim opened this issue Sep 15, 2017 · 3 comments
Open

Foodcritic plugin ignores .foodcritic file #214

alcasim opened this issue Sep 15, 2017 · 3 comments

Comments

@alcasim
Copy link

alcasim commented Sep 15, 2017

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
Copy link

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
Copy link

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
Copy link
Owner

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

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

No branches or pull requests

3 participants