Skip to content

Commit 4469fcd

Browse files
committed
add fail_with error
1 parent f0d6735 commit 4469fcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/msftidy.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,10 @@ def check_lines
544544
if ln =~ /^\s*def\s+(?:[^\(\)#]*[A-Z]+[^\(\)]*)(?:\(.*\))?$/
545545
warn("Please use snake case on method names: #{ln}", idx)
546546
end
547+
548+
if ln =~ /fail_with\(['"].+['"]\)/
549+
error("fail_with requires a Failure:: reason as first parameter: #{ln}", idx)
550+
end
547551
end
548552
end
549553

0 commit comments

Comments
 (0)