Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,4 @@ jobs:
with:
go-version-file: "go.mod"
cache: false # Use golangci-lint-action cache instead.
- uses: golangci/golangci-lint-action@v6
with:
version: v1.56
- uses: golangci/golangci-lint-action@v9
79 changes: 50 additions & 29 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,61 @@
version: "2"
run:
timeout: 5m
tests: true
skip-dirs:
- .github
skip-files:
- ".*_gen.go$"
output:
sort-results: true
linters: # https://golangci-lint.run/usage/linters/
enable-all: true
linters:
default: all
disable:
- depguard
- forbidigo
- err113 # Use errorlint instead.
- exhaustruct
- forbidigo
- nlreturn
- noinlineerr
- paralleltest
- testableexamples
- varnamelen
- wrapcheck
- goerr113 # Use errorlint instead.
- gofmt # Use gofumpt instead.
- testpackage
- tparallel # Use paralleltest instead.
- varnamelen
- wrapcheck
- wsl
- deadcode # deprecated
- exhaustivestruct # deprecated
- golint # deprecated
- ifshort # deprecated
- interfacer # deprecated
- maligned # deprecated
- nosnakecase # deprecated
- scopelint # deprecated
- structcheck # deprecated
- varcheck # deprecated
issues:
exclude-rules:
- path: _test\.go
linters:
- funlen
- wsl_v5
# v1 deprecated linters (removed in v2; no longer valid disable targets):
# - deadcode # deprecated
# - exhaustivestruct # deprecated
# - golint # deprecated
# - ifshort # deprecated
# - interfacer # deprecated
# - maligned # deprecated
# - nosnakecase # deprecated
# - scopelint # deprecated
# - structcheck # deprecated
# - varcheck # deprecated
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- funlen
path: _test\.go
paths:
- third_party$
- builtin$
- examples$
- ^\.github/
- .*_gen\.go$
formatters:
enable:
- gci
- gofumpt # Use gofumpt instead.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Stale comment on gofumpt — it already is gofumpt.

The comment # Use gofumpt instead. appears to be a leftover from the v1 config where it likely annotated the gofmt linter. Here it's on the gofumpt entry itself, so the comment is self-referential and misleading.

Proposed fix
-    - gofumpt # Use gofumpt instead.
+    - gofumpt
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- gofumpt # Use gofumpt instead.
- gofumpt
🤖 Prompt for AI Agents
In @.golangci.yml at line 52, Remove the stale/self-referential comment next to
the "gofumpt" entry in .golangci.yml (the comment "# Use gofumpt instead.") so
the linter list is not misleading; locate the "gofumpt" line and delete the
trailing comment, leaving only the linter name.

- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
- ^\.github/
- .*_gen\.go$
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/ichizero/errlog

go 1.22
go 1.24.0

toolchain go1.26.0