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

Commit

Permalink
FC019: Don't match on node.run_state, refs #66.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Crump committed Jul 24, 2013
1 parent 9f3d687 commit 41431e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions features/019_check_for_consistent_node_access.feature
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Feature: Check for consistency in node access
| reads | strings | platform? | not shown |
| reads | symbols | run_list | not shown |
| reads | symbols | run_state | not shown |
| reads | strings | run_state | not shown |
| reads | strings | set | not shown |
| reads | strings,symbols | set | shown |

Expand Down
2 changes: 1 addition & 1 deletion lib/foodcritic/rules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
types = [:string, :symbol, :vivified].map do |type|
{:access_type => type, :count => files.map do |file|
attribute_access(file[:ast], :type => type, :ignore_calls => true,
:cookbook_dir => cookbook_dir).tap do |ast|
:cookbook_dir => cookbook_dir, :ignore => 'run_state').tap do |ast|
unless ast.empty?
(asts[type] ||= []) << {:ast => ast, :path => file[:path]}
end
Expand Down
3 changes: 0 additions & 3 deletions spec/regression/expected-output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,6 @@ FC019: Access node attributes in a consistent manner: runit/definitions/runit_se
FC019: Access node attributes in a consistent manner: trac/recipes/default.rb:53
FC019: Access node attributes in a consistent manner: ufw/attributes/default.rb:1
FC019: Access node attributes in a consistent manner: ufw/attributes/default.rb:2
FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:22
FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:23
FC019: Access node attributes in a consistent manner: windows/providers/reboot.rb:24
FC019: Access node attributes in a consistent manner: zenoss/attributes/default.rb:33
FC019: Access node attributes in a consistent manner: zenoss/recipes/server.rb:62
FC019: Access node attributes in a consistent manner: zenoss/recipes/server.rb:86
Expand Down

0 comments on commit 41431e4

Please sign in to comment.