From a047667d640bc693b0f71edb65e986a33e195958 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Thu, 27 Jun 2024 09:25:14 +1000 Subject: [PATCH] chore: enable wrapcheck for new code This has been disabled because manually wrapping all errors is very tedious when iterating quickly, but it's come to the point where we need to do this in order to provide useful errors. Recent examples of this are https://github.com/TBD54566975/ftl/pull/1885 and https://github.com/TBD54566975/ftl/pull/1879. --- .github/workflows/ci.yml | 2 +- .golangci.yml | 1 - Justfile | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3b8f75cb7..68b2c6f870 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: - name: Build Cache uses: ./.github/actions/build-cache - name: golangci-lint - run: golangci-lint run --out-format github-actions ./... + run: golangci-lint run --new-from-rev=HEAD~ --out-format github-actions ./... - name: go-check-sumtype shell: bash run: go-check-sumtype ./... 2>&1 | to-annotation diff --git a/.golangci.yml b/.golangci.yml index 0642ccd592..93bac24c44 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -57,7 +57,6 @@ linters: - interfacebloat - tagalign - nolintlint - - wrapcheck # We might want to re-enable this if we manually wrap all the existing errors with fmt.Errorf - protogetter linters-settings: diff --git a/Justfile b/Justfile index 49515627d2..bf7181ec65 100644 --- a/Justfile +++ b/Justfile @@ -139,7 +139,7 @@ lint-frontend: build-frontend # Lint the backend lint-backend: - @golangci-lint run ./... + @golangci-lint run --new-from-rev=HEAD~ ./... # Run live docs server docs: