From a56332fcf0163844eaad21273d16ed068f2a1868 Mon Sep 17 00:00:00 2001 From: Michael FIG Date: Tue, 20 Jun 2023 16:37:58 -0600 Subject: [PATCH] ci(cosmos): forbid `%w` error-wrapping format specifier --- .github/workflows/golangci-lint.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 9cb9c995468..7d1e387affe 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -36,3 +36,10 @@ jobs: # only-new-issues: true only-new-issues: false working-directory: ./golang/cosmos + - name: forbid %w error-wrapping format specifier + run: | + set -e + if find ./golang/cosmos -name '*.go' ! -name '*_test.go' -print0 | xargs -0 grep '%w'; then + echo "Found %w in ./golang/cosmos; please use %s instead." + exit 1 + fi