From c9e2f2f60b2e3293fe04a06742d411d319d0b93d Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Wed, 4 Aug 2021 15:21:39 -0600 Subject: [CI:DOCS] tests-expect-exit: include source line numbers In the new check for preventing 'Expect(ExitCode...)', include source line numbers. Response to #11034, which I totally didn't even understand because it was referencing a different test. Sorry, Brent. Signed-off-by: Ed Santiago --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 32d2f44b7..fbd15bac7 100644 --- a/Makefile +++ b/Makefile @@ -607,7 +607,7 @@ tests-included: .PHONY: tests-expect-exit tests-expect-exit: - @if egrep 'Expect.*ExitCode' test/e2e/*.go | egrep -v ', ".*"\)'; then \ + @if egrep --line-number 'Expect.*ExitCode' test/e2e/*.go | egrep -v ', ".*"\)'; then \ echo "^^^ Unhelpful use of Expect(ExitCode())"; \ echo " Please use '.Should(Exit(...))' pattern instead."; \ echo " If that's not possible, please add an annotation (description) to your assertion:"; \ -- cgit v1.2.3-54-g00ecf