Skip to content

Commit 3720685

Browse files
[create-pull-request] automated change
1 parent 2059b18 commit 3720685

File tree

3 files changed

+113
-41
lines changed

3 files changed

+113
-41
lines changed

.golangci.reference.yml

+40-14
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ output:
7272
# - `junit-xml`
7373
# - `github-actions`
7474
# - `teamcity`
75+
# - `sarif`
7576
# Output path can be either `stdout`, `stderr` or path to the file to write to.
7677
#
7778
# For the CLI flag (`--out-format`), multiple formats can be specified by separating them by comma.
@@ -1388,14 +1389,16 @@ linters-settings:
13881389
min-complexity: 4
13891390

13901391
nilnil:
1391-
# Checks that there is no simultaneous return of `nil` error and an invalid value.
1392-
# Default: ["ptr", "func", "iface", "map", "chan"]
1392+
# List of return types to check.
1393+
# Default: ["ptr", "func", "iface", "map", "chan", "uintptr", "unsafeptr"]
13931394
checked-types:
13941395
- ptr
13951396
- func
13961397
- iface
13971398
- map
13981399
- chan
1400+
- uintptr
1401+
- unsafeptr
13991402

14001403
nlreturn:
14011404
# Size of the block (including return statement that is still "OK")
@@ -1996,39 +1999,56 @@ linters-settings:
19961999

19972000
sloglint:
19982001
# Enforce not mixing key-value pairs and attributes.
2002+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-mixed-arguments
19992003
# Default: true
20002004
no-mixed-args: false
20012005
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
2006+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-value-pairs-only
20022007
# Default: false
20032008
kv-only: true
20042009
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
2010+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#attributes-only
20052011
# Default: false
20062012
attr-only: true
20072013
# Enforce not using global loggers.
20082014
# Values:
20092015
# - "": disabled
20102016
# - "all": report all global loggers
20112017
# - "default": report only the default slog logger
2018+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-global
20122019
# Default: ""
20132020
no-global: "all"
20142021
# Enforce using methods that accept a context.
20152022
# Values:
20162023
# - "": disabled
20172024
# - "all": report all contextless calls
20182025
# - "scope": report only if a context exists in the scope of the outermost function
2026+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#context-only
20192027
# Default: ""
20202028
context: "all"
20212029
# Enforce using static values for log messages.
2030+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#static-messages
20222031
# Default: false
20232032
static-msg: true
20242033
# Enforce using constants instead of raw keys.
2034+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#no-raw-keys
20252035
# Default: false
20262036
no-raw-keys: true
20272037
# Enforce a single key naming convention.
20282038
# Values: snake, kebab, camel, pascal
2039+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#key-naming-convention
20292040
# Default: ""
20302041
key-naming-case: snake
2042+
# Enforce not using specific keys.
2043+
# Default: []
2044+
forbidden-keys:
2045+
- time
2046+
- level
2047+
- msg
2048+
- source
2049+
- foo
20312050
# Enforce putting arguments on separate lines.
2051+
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#forbidden-keys
20322052
# Default: false
20332053
args-on-sep-lines: true
20342054

@@ -2158,9 +2178,10 @@ linters-settings:
21582178
- error-is-as
21592179
- error-nil
21602180
- expected-actual
2161-
- go-require
21622181
- float-compare
2182+
- go-require
21632183
- len
2184+
- negative-positive
21642185
- nil-compare
21652186
- require-error
21662187
- suite-dont-use-pkg
@@ -2174,7 +2195,7 @@ linters-settings:
21742195
# Enable checkers by name
21752196
# (in addition to default
21762197
# blank-import, bool-compare, compares, empty, error-is-as, error-nil, expected-actual, go-require, float-compare,
2177-
# len, nil-compare, require-error, suite-dont-use-pkg, suite-extra-assert-call, useless-assert
2198+
# len, negative-positive, nil-compare, require-error, suite-dont-use-pkg, suite-extra-assert-call, useless-assert
21782199
# ).
21792200
enable:
21802201
- blank-import
@@ -2184,9 +2205,10 @@ linters-settings:
21842205
- error-is-as
21852206
- error-nil
21862207
- expected-actual
2187-
- go-require
21882208
- float-compare
2209+
- go-require
21892210
- len
2211+
- negative-positive
21902212
- nil-compare
21912213
- require-error
21922214
- suite-dont-use-pkg
@@ -2202,6 +2224,10 @@ linters-settings:
22022224
# Regexp for expected variable name.
22032225
# Default: (^(exp(ected)?|want(ed)?)([A-Z]\w*)?$)|(^(\w*[a-z])?(Exp(ected)?|Want(ed)?)$)
22042226
pattern: ^expected
2227+
go-require:
2228+
# To ignore HTTP handlers (like http.HandlerFunc).
2229+
# Default: false
2230+
ignore-http-handlers: true
22052231
require-error:
22062232
# Regexp for assertions to analyze. If defined, then only matched error assertions will be reported.
22072233
# Default: ""
@@ -2846,17 +2872,17 @@ issues:
28462872
- ".*\\.my\\.go$"
28472873
- lib/bad.go
28482874

2849-
# To follow strictly the Go generated file convention.
2875+
# Mode of the generated files analysis.
28502876
#
2851-
# If set to true, source files that have lines matching only the following regular expression will be excluded:
2852-
# `^// Code generated .* DO NOT EDIT\.$`
2853-
# This line must appear before the first non-comment, non-blank text in the file.
2854-
# https://go.dev/s/generatedcode
2877+
# - `strict`: sources are excluded by following strictly the Go generated file convention.
2878+
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
2879+
# This line must appear before the first non-comment, non-blank text in the file.
2880+
# https://go.dev/s/generatedcode
2881+
# - `lax`: sources are excluded if they contain lines `autogenerated file`, `code generated`, `do not edit`, etc.
2882+
# - `disable`: disable the generated files exclusion.
28552883
#
2856-
# By default, a lax pattern is applied:
2857-
# sources are excluded if they contain lines `autogenerated file`, `code generated`, `do not edit`, etc.
2858-
# Default: false
2859-
exclude-generated-strict: true
2884+
# Default: lax
2885+
exclude-generated: strict
28602886

28612887
# The list of ids of default excludes to include or disable.
28622888
# https://golangci-lint.run/usage/false-positives/#default-exclusions

0 commit comments

Comments
 (0)