diff --git a/features/019_check_for_consistent_node_access.feature b/features/019_check_for_consistent_node_access.feature index 4c0bfc7a..7574f547 100644 --- a/features/019_check_for_consistent_node_access.feature +++ b/features/019_check_for_consistent_node_access.feature @@ -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 | diff --git a/lib/foodcritic/rules.rb b/lib/foodcritic/rules.rb index 84b37b8f..b19ba3bf 100644 --- a/lib/foodcritic/rules.rb +++ b/lib/foodcritic/rules.rb @@ -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 diff --git a/spec/regression/expected-output.txt b/spec/regression/expected-output.txt index 89949692..19d8906a 100644 --- a/spec/regression/expected-output.txt +++ b/spec/regression/expected-output.txt @@ -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