Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Need a an option to hide 'requires chef server checks' #4

aussiegeek opened this Issue · 5 comments

2 participants


Basically I want to wire this up to my chef repo, with the goal being no alerts generated, and in my case I know I need chef server


Hi Alan,

Glad you asked for this. The FAQ I added recently touches on this:

There's no support right now for tailoring which warnings you are interested in. I have grandiose ideas of a JSON file (ok not that grandiose) to define a 'policy' or bunch of rules you care about.

However I think a simple command-line flag that let you specify includes / excludes would get you most of the way there for now? Something like --excludes FC003.

I can probably take a look at this tomorrow, or if you feel like submitting a pull request that would be cool.

There's also some need for the concept of severity so you can choose to ignore warnings for style completely if you wish to for example.

Are you looking at using this within CI (Jenkins)? If so you'd probably want foodcritic to return a non-zero exit code to fail the build if warnings were issued. Additionally adding support for foodcritic to the Jenkins Warning Plugin would be very cool I think.

@acrmp acrmp referenced this issue from a commit
@acrmp Add ability to choose rules applied, refs #4.
The DSL now accepts a tags array to define the set of tags available to choose
whether or not to apply the rule. This is lifted straight from Cucumber tag

I've pushed some changes to master that let you specify tags on the command line to include / exclude rules.
This is lifted straight from Cucumber tag expressions which you can read more about here:

For example you can exclude Chef Solo related warnings by running foodcritic like so:
foodcritic -t ~solo your_cookbook_path

This needs some better tests before I release an updated gem but I'd appreciate any feedback you can give before then.





This has been released in foodcritic 0.5.0. Let me know if you have any issues.


Hi Alan,

Have you had a chance to try this?


Closing this as delivered. Feel free to re-open if it's not quite what you want.

@acrmp acrmp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.