diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 419ce560..0c92a1d5 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -27,7 +27,7 @@ jobs: check-latest: true - run: go version - name: golangci-lint - uses: golangci/golangci-lint-action@v5 + uses: golangci/golangci-lint-action@v6 with: version: latest args: --timeout=5m diff --git a/.golangci.yml b/.golangci.yml index 56cadf40..732a39f3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -33,7 +33,6 @@ linters: - errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and optionally reports occasions, where the check for the returned error can be omitted. - errname # Checks that sentinel errors are prefixed with the `Err` and error types are suffixed with the `Error`. - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. - - execinquery # Execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds. - exportloopref # checks for pointers to enclosing loop variables - forcetypeassert # finds forced type assertions - gci # Gci control golang package import order and make it always deterministic. @@ -94,11 +93,10 @@ linters: - whitespace # Tool for detection of leading and trailing whitespace disable: - containedctx # containedctx is a linter that detects struct contained context.Context field - - contextcheck # check the function whether use a non-inherited context + - contextcheck # check the function whether use a non-inherited contextf - cyclop # checks function and package cyclomatic complexity - depguard # Go linter that checks if package imports are in a list of acceptable packages - exhaustive # Check exhaustiveness of enum switch statements - - exhaustivestruct # Checks if all struct's fields are initialized - exhaustruct # Checks if all structure fields are initialized. - forbidigo # Forbids identifiers - funlen # Tool for detection of long functions @@ -106,13 +104,11 @@ linters: - gochecknoinits # Checks that no init functions are present in Go code - godot # Check if comments end in a period - gomnd # An analyzer to detect magic numbers. - - ifshort # Checks that your code uses short syntax for if-statements whenever possible - inamedparam # Reports interfaces with unnamed method parameters. - interfacebloat # A linter that checks the number of methods inside an interface - ireturn # Accept Interfaces, Return Concrete Types - lll # Reports long lines - maintidx # maintidx measures the maintainability index of each function. - - maligned # Tool to detect Go structs that would take less memory if their fields were sorted - nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity - nonamedreturns # Reports all named returns - paralleltest # paralleltest detects missing usage of t.Parallel() method in your Go test