diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0858585e..f2b0d3c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,7 +90,7 @@ jobs: name: Go lint runs-on: ubuntu-latest env: - GOLANGCI_LINT_VERSION: v2.11.4 + GOLANGCI_LINT_VERSION: v2.13.1 GOPROXY: https://proxy.golang.org,https://u:${{ secrets.RIVERPRO_GO_MOD_CREDENTIAL }}@riverqueue.com/goproxy,direct permissions: contents: read diff --git a/.golangci.yaml b/.golangci.yaml index 98fcd09e..f462ce6d 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -4,11 +4,15 @@ linters: default: all disable: + # disabled because they have replacements enabled by default + - gomodguard # replaced by gomodguard_v2 + # disabled, but which we should enable with discussion - wrapcheck # checks that errors are wrapped; currently not done anywhere # disabled because we're not compliant, but which we should think about - exhaustruct # checks that properties in structs are exhaustively defined; may be a good idea + - exhaustruct_v5 # replacement for exhaustruct - testpackage # requires tests in test packages like `river_test` # disabled because they're annoying/bad @@ -50,6 +54,9 @@ linters: - msg: Use built-in `min` function instead. pattern: \bmath\.Min\b + goconst: + ignore-tests: true + gomoddirectives: replace-local: true diff --git a/riverproui/internal/prohandler/pro_handler_api_endpoints.go b/riverproui/internal/prohandler/pro_handler_api_endpoints.go index 19c76811..aa81b1f7 100644 --- a/riverproui/internal/prohandler/pro_handler_api_endpoints.go +++ b/riverproui/internal/prohandler/pro_handler_api_endpoints.go @@ -706,7 +706,7 @@ func (req *workflowListRequest) ExtractRaw(r *http.Request) error { } if state := r.URL.Query().Get("state"); state != "" { - req.State = (state) + req.State = state } return nil