Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

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

Closed
aussiegeek opened this issue Dec 11, 2011 · 5 comments
Closed

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

aussiegeek opened this issue Dec 11, 2011 · 5 comments

Comments

@aussiegeek
Copy link

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

@acrmp
Copy link
Member

acrmp commented Dec 11, 2011

Hi Alan,

Glad you asked for this. The FAQ I added recently touches on this:
http://acrmp.github.com/foodcritic/#faq

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.
https://wiki.jenkins-ci.org/display/JENKINS/Warnings+Plugin

acrmp pushed a commit that referenced this issue Dec 12, 2011
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
expressions.
@acrmp
Copy link
Member

acrmp commented Dec 12, 2011

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:
https://github.com/cucumber/cucumber/wiki/tags

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.

Cheers,

Andrew.

@acrmp
Copy link
Member

acrmp commented Dec 13, 2011

Hi,

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

@acrmp
Copy link
Member

acrmp commented Dec 20, 2011

Hi Alan,

Have you had a chance to try this?

@acrmp
Copy link
Member

acrmp commented Jan 20, 2012

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

@acrmp acrmp closed this as completed Jan 20, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants