Announcing Foodcritic 6.0


#1

Yesterday we released Foodcritic 6.0 with a large number of new rules, tag updates, and bug fixes. There are new rules to ensure metadata information is present and correct and there’s a slew of new rules for creating proper custom resources (HWRP and LWRP). Here’s the complete changelog:

Features:

Added FC055 to ensure that metadata.rb contains a maintainer
Added FC056 to ensure that metadata.rb contains a maintainer_email
Added FC057 to ensure that library providers include use_inline_resources
Added FC058 to ensure that library providers that include use_inline_resources and action_ methods
Added FC059 to ensure that LWRPs include use_inline_resources
Added FC060 to ensure that LWRPs don’t use bad action methods
Added FC061 to ensure that the cookbook version is valid
Added FC062 to ensure that metadata includes a version
Added FC063 to ensure that a cookbook doesn’t depend on itself in the metadata
Added DSL metadata for Chef 12.5.1 and 12.6.0
Added new chef11 and chef12 tags for rules related to changes in those Chef releases
Added Oracle as an equivalent platform for the RHEL platform family in FC024
Removed the Mustache pin to 0.99 in the Gemfile since we require Ruby 2.0+ now

Bugfixes:

Renamed FC045 from ‘Consider setting cookbook name in metadata’ to ‘Metadata does not contain cookbook name’ as Chef 12 requires name metadata
Renamed FC015 from ‘Consider converting definition to a LWRP’ to ‘Consider converting definition to a Custom Resource’ since 12.5+ Custom Resources are a prefered pattern over LWRPs now
Changed FC045’s annoyances tag to a correctness tag as name in metadata is now a requirement not an annoyance
Fixed the Rake tasks
Fixed FC048 incorrectly firing when a method name included “system"

https://github.com/acrmp/foodcritic https://github.com/acrmp/foodcritic
https://rubygems.org/gems/foodcritic https://rubygems.org/gems/foodcritic

Check out the new version and make sure to open issues on Github if you run into any false positives.

-Tim