We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 753978f + d494bdd commit 3300845Copy full SHA for 3300845
tools/msftidy.rb
@@ -544,6 +544,13 @@ def check_lines
544
if ln =~ /^\s*def\s+(?:[^\(\)#]*[A-Z]+[^\(\)]*)(?:\(.*\))?$/
545
warn("Please use snake case on method names: #{ln}", idx)
546
end
547
+
548
+ if ln =~ /^\s*fail_with\(/
549
+ unless ln =~ /^\s*fail_with\(Failure\:\:(?:None|Unknown|Unreachable|BadConfig|Disconnected|NotFound|UnexpectedReply|TimeoutExpired|UserInterrupt|NoAccess|NoTarget|NotVulnerable|PayloadFailed),/
550
+ error("fail_with requires a valid Failure:: reason as first parameter: #{ln}", idx)
551
+ end
552
553
554
555
556
0 commit comments