- FC025: Prefer chef_gem to compile-time gem install rule added.
- Rules can now declare which versions of Chef they
apply_to. The new command line argument
--chef-version) should be used to specify the effective Chef version.
- FC001: Use strings in preference to symbols to access node attributes could show false positives when using Chef search.
- FC001: Use strings in preference to symbols to access node attributes would overlook the use of symbols to access node attributes when passing template variables.
- FC002: Avoid string interpolation where not required fixed to no longer ignore the first keypair in a Hash (related issue). Thanks @Ips1975.
FC004: Use a service resource to start and stop services
modified not to warn if the action is not supported by the
- FC005: Avoid repetition of resource declarations modified not to warn when resources are branched within conditionals or provider actions.
FC007: Ensure recipe dependencies are reflected in cookbook metadata
modified to ignore the use of
include_recipewith embedded expressions.
FC023: Prefer conditional attributes
modified not to warn if the conditional expression has an
resource_attributesAPI method has been updated to return block attributes which were previously ignored (related issue). Thanks @jonlives.
- FC024: Consider adding platform equivalents rule added.
- When writing new rules it is no longer necessary to explicitly map matching AST nodes to matches. You can now just return the AST nodes.
cookbook_namemethod now reflects the cookbook name if specified in metadata. This prevents a warning from being shown by FC007: Ensure recipe dependencies are reflected in cookbook metadata if the cookbook is in a differently named directory.
declared_dependenciesmethod previously would intermix version strings in the list of cookbook names.
- Chef 0.10.10 will include a new DSL method for defining a
default_actionfor resources. Rule FC016: LWRP does not declare a default action has been updated to recognise the DSL change.
- Nokogiri dependency constraint changed to no longer lock to 1.5.0 as their next release should include the fix for custom XPath functions.
- Nokogiri 1.5.1 and 1.5.2 cause a segfault so prevent their use until a fix is released (related issue). Thanks @miah.
-Ioption added to specify the path to your own custom rules (related issue).
- The Rule API was previously not supported and subject to change without warning. From this release it will now follow the same versioning policy as the command line interface.
- A version flag (--version or -V) has been added (related issue).
- The evaluation of rule tags has been updated to be consistent with Cucumber. The major version number of foodcritic has been bumped to indicate that this is a breaking change. If you make use of tags (for example in a CI build) you may need to update your syntax. See the related issue for more information. Thanks @jaymzh.
- FC003: Check whether you are running with chef server before using server-specific features has been updated to correctly identify the new version of chef-solo-search (related issue).
- Foodcritic could fail to activate yajl-json in some circumstances, failing with a runtime error. Whether this occurred was dependent on the version of yajl-ruby activated by Chef, which would vary dependent on the other gems installed on the system. See the related issue for more information. Thanks @jaymzh for identifying the issue and striving to get Foodcritic playing well with Omnibus.
- Major bugfix to FC006: Mode should be quoted or fully specified when setting file permissions. In earlier versions a four-digit literal file mode that set the first octet would not have been picked up by this rule (related issue). Thanks @aia for finding and fixing this bug. Check your cookbooks against FC006 after upgrading to see if you are affected.
- Performance improvements.
- FC023: Prefer conditional attributes rule added. Stolen from @ampledata with thanks.
-Soption added to allow an alternate search grammar to be specified.
- Chef is no longer loaded at startup for performance reasons. Foodcritic now ships with Chef DSL metadata.
- New experimental
-Coption added to output context for rule matches.
- FC021: Resource condition in provider may not behave as expected rule added.
- FC022: Resource condition within loop may not behave as expected rule added.
- FC005: Avoid repetition of resource declarations rule modified to only warn when there are at least three consecutive resources of the same type that could be 'rolled up' into a loop.
- FC016: LWRP does not declare a default action rule restored. Thanks @stevendanna
- FC019: Access node attributes in a consistent manner rule modified to no longer treat DSL mixin methods as auto-vivified attributes. Identification of least used access method should now be accurate.
- FC020: Conditional execution string attribute looks like Ruby rule now grabs conditions from within single quotes.
- FC019: Access node attributes in a consistent manner modified to avoid false positives on methods invoked on values in a Mash.
- FC019: Access node attributes in a consistent manner rule added.
- FC020: Conditional execution string attribute looks like Ruby rule added.
- Rule 'FC016: LWRP does not declare a default action' was incorrectly checking the provider for a default action rather than the resource. Removed this rule temporarily to avoid showing false positives. A user has patched this and will be submitting a pull request shortly.
-foption added to allow you to specify which warnings should result in the build being failed. See the new documentation on using Foodcritic in Continuous Integration for more information.
-roption added to drop you into the Pry REPL to interactively develop rules. See the updated documentation on Writing a new rule for more information.
- FC003: Check whether you are running with chef server before using server-specific features rule modified to not warn if the edelight chef-solo-search library has been installed. Thanks @tobami.
- FC007: Ensure recipe dependencies are reflected in cookbook metadata rule modified to flag undeclared dependencies against the offending file rather than metadata.rb.
- Removed the unused description field from the rule dsl.
- Project features now run much faster, running in-process by default. You can set an environment variable
FC_FORK_PROCESS) to specify that Cucumber runs should match the earlier behaviour and spawn a separate process using Aruba.
- FC001: Use strings in preference to symbols to access node attributes rule added.
- FC004: Use a service resource to start and stop services rule extended to recognise upstart and invoke-rc.d.
- FC011: Missing README in markdown format rule added.
- FC012: Use Markdown for README rather than RDoc rule added.
- FC013: Use file_cache_path rather than hard-coding tmp paths rule added.
- FC014: Consider extracting long ruby_block to library rule added.
- FC015: Consider converting definition to a LWRP rule added.
- FC016: LWRP does not declare a default action rule added.
- FC017: LWRP does not notify when updated rule added.
- FC018: LWRP uses deprecated notification syntax rule added.
- Ensure warnings are line sorted numerically. Commit eb1762fd0fbf99fa513783d7838ceac0147c37bc
- FC005: Avoid repetition of resource declarations rule made less aggressive.
- Fix JSON version range for compatibility with Bundler / Chef 0.10.6. (related issue). Thanks @dysinger.
- Relaxed Ruby version constraint so we can run on 1.9.2 (related issue). Yay. Thanks @someara.
- Added the ability to choose rules to apply via tags (related issue). This uses the same syntax as Cucumber tag expressions.
- FC010: Invalid search syntax rule added.
- Spiffy new home page and documentation
- FC008: Generated cookbook metadata needs updating rule added.
- FC009: Resource attribute not recognised rule added. This adds a dependency on the Chef gem.
- Performance improvement.
- Fixed typo in FC004 feature description (related issue). Thanks @smith.
- Prevented statements within nested resource blocks from being interpreted as resource attributes.
- Significantly slower! But now you can write rules using xpath or css selectors.
- FC006: File mode rule added.
- FC007: Undeclared recipe dependencies rule added.
- Removed 'FC001: Use symbols in preference to strings to access node attributes' until a policy mechanism is introduced (related issue). Thanks @jtimberman