Fix SA5011 errors by making control flow abort obvious to linter

This commit is contained in:
Hanna Lee 2021-07-15 16:15:05 -04:00 committed by Antonio Ojea
parent 1fbf06f5ad
commit 04fadd8b03
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ func Failf(format string, args ...interface{}) {
skip := 2
log("FAIL", "%s\n\nFull Stack Trace\n%s", msg, PrunedStack(skip))
e2eginkgowrapper.Fail(nowStamp()+": "+msg, skip)
panic("unreachable")
}
// Fail is a replacement for ginkgo.Fail which logs the problem as it occurs

View File

@ -118,6 +118,7 @@ func pruneStack(skip int) string {
// Skipf skips with information about why the test is being skipped.
func Skipf(format string, args ...interface{}) {
skipInternalf(1, format, args...)
panic("unreachable")
}
// SkipUnlessAtLeast skips if the value is less than the minValue.