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

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

Comments

Projects
None yet
2 participants
@aussiegeek

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

This comment has been minimized.

Show comment Hide comment
@acrmp

acrmp Dec 11, 2011

Owner

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

Owner

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 added a commit that referenced this issue Dec 12, 2011

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
expressions.
@acrmp

This comment has been minimized.

Show comment Hide comment
@acrmp

acrmp Dec 12, 2011

Owner

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.

Owner

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

This comment has been minimized.

Show comment Hide comment
@acrmp

acrmp Dec 13, 2011

Owner

Hi,

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

Owner

acrmp commented Dec 13, 2011

Hi,

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

@acrmp

This comment has been minimized.

Show comment Hide comment
@acrmp

acrmp Dec 20, 2011

Owner

Hi Alan,

Have you had a chance to try this?

Owner

acrmp commented Dec 20, 2011

Hi Alan,

Have you had a chance to try this?

@acrmp

This comment has been minimized.

Show comment Hide comment
@acrmp

acrmp Jan 20, 2012

Owner

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

Owner

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 Jan 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment