diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bece6a..ec7df00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: go-version: "1.22.3" # update together with dev.dockerfile - uses: golangci/golangci-lint-action@v6 with: - version: "v1.58.2" # update together with dev.dockerfile + version: "v1.59.0" # update together with dev.dockerfile check-tidy: name: go mod tidy diff --git a/.golangci.yml b/.golangci.yml index e54783a..cc8e350 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -106,8 +106,8 @@ linters-settings: reason: "satori's package is not maintained" - github.com/gofrs/uuid: recommendations: - - github.com/google/uuid - reason: "gofrs' package is not go module" + - github.com/gofrs/uuid/v5 + reason: "gofrs' package was not go module before v5" govet: # Enable all analyzers. @@ -177,6 +177,24 @@ linters-settings: packages: - github.com/jmoiron/sqlx + sloglint: + # Enforce not using global loggers. + # Values: + # - "": disabled + # - "all": report all global loggers + # - "default": report only the default slog logger + # https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global + # Default: "" + no-global: "all" + # Enforce using methods that accept a context. + # Values: + # - "": disabled + # - "all": report all contextless calls + # - "scope": report only if a context exists in the scope of the outermost function + # https://github.com/go-simpler/sloglint?tab=readme-ov-file#context-only + # Default: "" + context: "scope" + tenv: # The option `all` will run against whole test files (`_test.go`) regardless of method/function signatures. # Otherwise, only methods that take `*testing.T`, `*testing.B`, and `testing.TB` as arguments are checked. diff --git a/dev.dockerfile b/dev.dockerfile index e8fc4ba..94fd1e7 100644 --- a/dev.dockerfile +++ b/dev.dockerfile @@ -2,7 +2,7 @@ FROM golang:1.22.3 AS go # update together with .github/workflows/ci.yml -FROM golangci/golangci-lint:v1.58.2 AS linter +FROM golangci/golangci-lint:v1.59.0 AS linter FROM go AS dev ENV INSIDE_DEV_CONTAINER 1