Skip to content
Snippets Groups Projects
Commit 8a74e648 authored by Jack Nagel's avatar Jack Nagel
Browse files

audit: warn about top-level methods

parent 4f45077f
No related branches found
No related tags found
No related merge requests found
......@@ -442,6 +442,10 @@ class FormulaAuditor
if text =~ /depends_on [A-Z][\w:]+\.new$/
problem "`depends_on` can take requirement classes instead of instances"
end
if text =~ /^def (\w+).*$/
problem "Define method #{$1.inspect} in the class body, not at the top-level"
end
end
def audit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment