Skip to content

Commit

Permalink
Update golangci-lint settings
Browse files Browse the repository at this point in the history
Signed-off-by: James Pond <[email protected]>
  • Loading branch information
jamesponddotco committed Dec 16, 2023
1 parent 98a3783 commit 1a39a1c
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@
skip-dirs = [".tmp"]
skip-dirs-use-default = "false"
modules-download-mode = "readonly"

# Tell golangci-lint to use Go 1.17 to ensure all linters work. This is a
# temporary solution until #2649[1] is resolved.
go = "1.17"
go = "1.20"

[linters]
disable-all = true
enable = [
"asasalint",
"asciicheck",
"bidichk",
"bodyclose",
"containedctx",
"contextcheck",
"durationcheck",
"dupl",
"durationcheck",
"errcheck",
"errchkjson",
"errname",
Expand All @@ -27,8 +23,11 @@ enable = [
"forbidigo",
"forcetypeassert",
"gci",
"gocheckcompilerdirectives",
"gochecknoglobals",
"gochecknoinits",
"gocognit",
"goconst",
"gocritic",
"gocyclo",
"godot",
Expand All @@ -38,24 +37,31 @@ enable = [
"gosimple",
"govet",
"ineffassign",
"interfacebloat",
"makezero",
"mirror",
"maintidx",
"misspell",
"nestif",
"nilerr",
"nilnil",
"noctx",
"nolintlint",
"nosprintfhostport",
"paralleltest",
"perfsprint",
"prealloc",
"predeclared",
"reassign",
"revive",
"sloglint",
"staticcheck",
"stylecheck",
"tenv",
"testpackage",
"testableexamples",
"thelper",
"tparallel",
"typecheck",
"unconvert",
"usestdlibvars",
Expand Down Expand Up @@ -281,6 +287,10 @@ enable = [
[[linters-settings.revive.rules]]
name = "waitgroup-by-value"

[linters-settings.sloglint]
kv-only = true
args-on-sep-lines = true

[linters-settings.staticcheck]
checks = ["all"]

Expand All @@ -305,6 +315,9 @@ max-same-issues = 0
"containedctx",
"contextcheck",
"errcheck",
"gochecknoglobals",
"gocognit",
"gocyclo",
"goerr113",
"nilerr",
"noctx",
Expand All @@ -315,5 +328,3 @@ max-same-issues = 0
[[issues.exclude-rules]]
path = "_test.go"
text = "fieldalignment"

# [1] https://github.com/golangci/golangci-lint/issues/2649

0 comments on commit 1a39a1c

Please sign in to comment.