Skip to content

Commit

Permalink
Fix SA5011 errors by making control flow abort obvious to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
hlee95 authored and Antonio Ojea committed Nov 17, 2021
1 parent 1fbf06f commit 04fadd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/e2e/framework/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/e2e/framework/skipper/skipper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 04fadd8

Please sign in to comment.