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

Commit

Permalink
Rename FC045 since Chef 12 requires name metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
tas50 committed Oct 28, 2015
1 parent c762cfa commit 91ea1f0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
@@ -1,3 +1,9 @@
## Unreleased

- Renamed FC045 from 'Consider setting cookbook name in metadata' to 'Metadata does not contain cookbook name' as Chef 12 requires name metadata
- Removed the annoyances tag from FC045 as it's not longer an annoyance, but instead a requirement
- Added DSL metadata for Chef 12.5.1

## 5.0.0 (17 September, 2015)

Features:
Expand Down Expand Up @@ -26,7 +32,7 @@ Bugfixes:
([related issue](https://github.com/acrmp/foodcritic/pull/313)).
- pinned moustache gem to 0.99 for ruby 1.9.3 compatibility
Thanks @jdmundrawala
- Added metadata for missing Chef 11 versions.
- Added metadata for missing Chef 11 versions.
Thanks @jdmundrawala
- [FC044: Avoid bare attribute keys](http://acrmp.github.com/foodcritic/#FC044) would fire on parameterized attributes.
Thanks @odcinek
Expand Down
2 changes: 1 addition & 1 deletion features/support/command_helpers.rb
Expand Up @@ -55,7 +55,7 @@ def assertions
'FC042' => 'Prefer include_recipe to require_recipe',
'FC043' => 'Prefer new notification syntax',
'FC044' => 'Avoid bare attribute keys',
'FC045' => 'Consider setting cookbook name in metadata',
'FC045' => 'Metadata does not contain cookbook name',
'FC046' => 'Attribute assignment uses assign unless nil',
'FC047' => 'Attribute assignment does not specify precedence',
'FC048' => 'Prefer Mixlib::ShellOut',
Expand Down
4 changes: 2 additions & 2 deletions lib/foodcritic/rules.rb
Expand Up @@ -663,8 +663,8 @@ def pry_bindings(ast)
end
end

rule 'FC045', 'Consider setting cookbook name in metadata' do
tags %w(annoyances metadata)
rule 'FC045', 'Metadata does not contain cookbook name' do
tags %w(metadata)
metadata do |ast, filename|
unless ast.xpath('descendant::stmts_add/command/ident/@value="name"')
[file_match(filename)]
Expand Down
2 changes: 1 addition & 1 deletion spec/regression/expected-output.txt
Expand Up @@ -358,7 +358,7 @@ FC043: Prefer new notification syntax: ./tomcat/recipes/users.rb:22
FC043: Prefer new notification syntax: ./yum/providers/key.rb:60
FC043: Prefer new notification syntax: ./yum/providers/repository.rb:94
FC044: Avoid bare attribute keys: ./resolver/attributes/default.rb:20
FC045: Consider setting cookbook name in metadata: ./maven/metadata.rb:1
FC045: Metadata does not contain cookbook name: ./maven/metadata.rb:1
FC047: Attribute assignment does not specify precedence: ./jetty/recipes/cargo.rb:35
FC047: Attribute assignment does not specify precedence: ./users/providers/manage.rb:55
FC048: Prefer Mixlib::ShellOut: ./apt/providers/repository.rb:26
Expand Down

0 comments on commit 91ea1f0

Please sign in to comment.