Skip to content

Commit 2b2db89

Browse files
Bump golangci/golangci-lint from v2.11.4 to v2.12.1 (#214)
* Bump golangci/golangci-lint from v2.11.4 to v2.12.1 Bumps golangci/golangci-lint from v2.11.4 to v2.12.1. --- updated-dependencies: - dependency-name: golangci/golangci-lint dependency-version: v2.12.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Update linter config --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marat Reimers <marat.maratori@gmail.com>
1 parent 997e1ed commit 2b2db89

4 files changed

Lines changed: 14 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
go-version: "1.26.2" # update together with dev.dockerfile
6666
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
6767
with:
68-
version: "v2.11.4" # update together with dev.dockerfile
68+
version: "v2.12.1" # update together with dev.dockerfile
6969

7070
lint-latest-deps:
7171
runs-on: ubuntu-latest
@@ -77,7 +77,7 @@ jobs:
7777
- run: make apply-latest-deps
7878
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
7979
with:
80-
version: "v2.11.4" # update together with dev.dockerfile
80+
version: "v2.12.1" # update together with dev.dockerfile
8181

8282
check-tidy:
8383
name: go mod tidy

.golangci.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ linters:
4040
- bidichk # checks for dangerous unicode character sequences
4141
- bodyclose # checks whether HTTP response body is closed successfully
4242
- canonicalheader # checks whether net/http.Header uses canonical header
43+
- clickhouselint # detects common mistakes with the ClickHouse native Go driver API
4344
- copyloopvar # detects places where loop variables are copied (Go 1.22+)
4445
- cyclop # checks function and package cyclomatic complexity
4546
- depguard # checks if package imports are in a list of acceptable packages
@@ -90,6 +91,7 @@ linters:
9091
- nolintlint # reports ill-formed or insufficient nolint directives
9192
- nonamedreturns # reports all named returns
9293
- nosprintfhostport # checks for misuse of Sprintf to construct a host with port in a URL
94+
- paralleltest # detects missing usage of t.Parallel() method in your Go test
9395
- perfsprint # checks that fmt.Sprintf can be replaced with a faster alternative
9496
- predeclared # finds code that shadows one of Go's predeclared identifiers
9597
- promlinter # checks Prometheus metrics naming via promlint
@@ -146,7 +148,6 @@ linters:
146148
#- maintidx # measures the maintainability index of each function
147149
#- misspell # [useless] finds commonly misspelled English words in comments
148150
#- nlreturn # [too strict and mostly code is not more readable] checks for a new line before return and branch statements to increase code clarity
149-
#- paralleltest # [too many false positives] detects missing usage of t.Parallel() method in your Go test
150151
#- tagliatelle # checks the struct tags
151152
#- thelper # detects golang test helpers without t.Helper() call and checks the consistency of test helpers
152153
#- wsl # [too strict and mostly code is not more readable] whitespace linter forces you to use empty lines
@@ -391,21 +392,15 @@ linters:
391392
- github.com/jmoiron/sqlx
392393

393394
sloglint:
394-
# Enforce not using global loggers.
395-
# Values:
396-
# - "": disabled
397-
# - "all": report all global loggers
398-
# - "default": report only the default slog logger
399-
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global
400-
# Default: ""
395+
# Report the use of global loggers.
396+
# https://github.com/go-simpler/sloglint#no-global-logger
397+
# Values: "all", "default"
398+
# Default: "" (disabled)
401399
no-global: all
402-
# Enforce using methods that accept a context.
403-
# Values:
404-
# - "": disabled
405-
# - "all": report all contextless calls
406-
# - "scope": report only if a context exists in the scope of the outermost function
407-
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#context-only
408-
# Default: ""
400+
# Report the use of functions without a context.Context.
401+
# https://github.com/go-simpler/sloglint#context-only
402+
# Values: "all", "scope"
403+
# Default: "" (disabled)
409404
context: scope
410405

411406
staticcheck:

dev.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM golang:1.26.2 AS go
33

44
# update together with .github/workflows/ci.yml
5-
FROM golangci/golangci-lint:v2.11.4 AS linter
5+
FROM golangci/golangci-lint:v2.12.1 AS linter
66

77
FROM go AS dev
88
ENV INSIDE_DEV_CONTAINER=1

pkg/testableexamples/testableexamples_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
)
1111

1212
func TestAnalyzer(t *testing.T) {
13+
t.Parallel()
1314
// dir is named `testfiles` not `testdata` to be able to run examples with `make test`
1415
testdata, err := filepath.Abs("testfiles")
1516
if err != nil {

0 commit comments

Comments
 (0)