diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b3b8f75cb7..b2ffd1a6db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,12 +58,14 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Init Hermit uses: cashapp/activate-hermit@v1 - 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="$(git merge-base origin/main 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..70ae697691 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=$(git merge-base origin/main HEAD) ./... # Run live docs server docs: