Merge pull request #6 from wvu-r7/pr/5171

Consolidate on one check and fix false positives
bug/bundler_fix
Christian Mehlmauer 2015-04-17 06:20:57 +02:00
commit d494bdd5e3
1 changed files with 1 additions and 3 deletions

View File

@ -546,9 +546,7 @@ class Msftidy
end
if ln =~ /^\s*fail_with\(/
if ln =~ /^\s*fail_with\(['"].+['"]\)/
error("fail_with requires a Failure:: reason as first parameter: #{ln}", idx)
elsif ln !~ /^\s*fail_with\(Failure\:\:(?:None|Unknown|Unreachable|BadConfig|Disconnected|NotFound|UnexpectedReply|TimeoutExpired|UserInterrupt|NoAccess|NoTarget|NotVulnerable|PayloadFailed),.+\)/
unless ln =~ /^\s*fail_with\(Failure\:\:(?:None|Unknown|Unreachable|BadConfig|Disconnected|NotFound|UnexpectedReply|TimeoutExpired|UserInterrupt|NoAccess|NoTarget|NotVulnerable|PayloadFailed),/
error("fail_with requires a valid Failure:: reason as first parameter: #{ln}", idx)
end
end