diff --git a/lib/foodcritic/api.rb b/lib/foodcritic/api.rb index 2e36d359..16e34e2c 100644 --- a/lib/foodcritic/api.rb +++ b/lib/foodcritic/api.rb @@ -186,7 +186,7 @@ def match(node) # a string or a Node if the resource name is an expression. def notifications(ast) return [] unless ast.respond_to?(:xpath) - ast.xpath('//command[ident/@value="notifies" or + ast.xpath('descendant::command[ident/@value="notifies" or ident/@value="subscribes"]').map do |notifies| params = notifies.xpath('descendant::method_add_arg[fcall/ident/