From 9d4f98704e44554cf3d155b87a44051844dea578 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Fri, 22 Nov 2024 16:39:39 +0200 Subject: [PATCH] feat(.github): add staticcheck (#326) --- .github/workflows/unit-tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index efa8ab8..28fdee5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -28,6 +28,11 @@ jobs: uses: actions/setup-go@v5 with: go-version: 1.23.x + + - name: Install tools + run: | + go install honnef.co/go/tools/cmd/staticcheck@latest + - name: Checkout code uses: actions/checkout@v4 @@ -50,3 +55,10 @@ jobs: echo "Code unformatted, please run 'gofmt -w -s .'" exit 1 fi + + - name: staticcheck . + run: staticcheck -checks "inherit,-U1000" ./... + + - name: staticcheck ./examples + working-directory: ./examples + run: staticcheck -checks "inherit,-U1000" ./... \ No newline at end of file