Skip to content

Commit

Permalink
[repo-updater] push update golangcilint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dops-sre committed Dec 9, 2023
1 parent c756b70 commit 73bf171
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ run:

linters:
enable:
- containedctx
- contextcheck
- errchkjson
- durationcheck
- forcetypeassert
- goconst
- makezero
- sloglint
- wastedassign
- bodyclose
- dogsled
- errorlint
Expand All @@ -15,7 +24,6 @@ linters:
- gofumpt
- goimports
- gosec
- lll
- misspell
- nakedret
- nestif
Expand All @@ -28,23 +36,25 @@ linters:
- unparam

linters-settings:
lll:
line-length: 140
tab-width: 4
errcheckjson:
# report warning when checking error when not required
check-error-free-encoding: true
# encoding of struct with no exported fields
report-no-exported: true
sloglint:
# only allow attribute style formatting instead of kv
attr-only: true
# only allow static messages
static-msg: true
# arguments on separate lines required
args-on-sep-lines: true
nolintlint:
# Enable to ensure that nolint directives are all used. Default is true.
allow-unused: false
# Disable to ensure that nolint directives don't have a leading space. Default is true.
allow-leading-space: false
# Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
require-specific: true
nestif:
# minimal complexity of if statements to report, 5 by default
min-complexity: 7
gocognit:
# Minimal code complexity to report
# Default: 30 (but we recommend 10-20)
min-complexity: 32
godot:
# List of regexps for excluding particular comment lines from check.
exclude:
Expand Down

0 comments on commit 73bf171

Please sign in to comment.