Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure rules are processed correctly.

  • Loading branch information...
commit 6bbc42a832cf34873633a271d71908e35ae1f3c2 1 parent 4261f8b
@acrmp authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/foodcritic/rules.rb
View
9 lib/foodcritic/rules.rb
@@ -402,13 +402,14 @@
rule "FC030", "Cookbook contains debugger breakpoints" do
tags %w{annoyances}
- recipe do |ast|
+ def pry_bindings(ast)
ast.xpath('//call[(vcall|var_ref)/ident/@value="binding"]
[ident/@value="pry"]')
end
- library{recipe}
- metadata{recipe}
- template{recipe}
+ recipe{|ast| pry_bindings(ast)}
+ library{|ast| pry_bindings(ast)}
+ metadata{|ast| pry_bindings(ast)}
+ template{|ast| pry_bindings(ast)}
end
rule "FC031", "Cookbook without metadata file" do
Please sign in to comment.
Something went wrong with that request. Please try again.