Skip to content

Commit 1bfcc5f

Browse files
Antonboomldez
andauthored
docs: describe enabled and disabled by default analyzers of govet (#4146)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 904cec8 commit 1bfcc5f

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.golangci.reference.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,21 +1044,29 @@ linters-settings:
10441044
strict: true
10451045
unusedresult:
10461046
# Comma-separated list of functions whose results must be used
1047-
# (in addition to defaults context.WithCancel,context.WithDeadline,context.WithTimeout,context.WithValue,
1048-
# errors.New,fmt.Errorf,fmt.Sprint,fmt.Sprintf,sort.Reverse)
1049-
# Default []
1047+
# (in addition to default:
1048+
# context.WithCancel, context.WithDeadline, context.WithTimeout, context.WithValue, errors.New, fmt.Errorf,
1049+
# fmt.Sprint, fmt.Sprintf, sort.Reverse
1050+
# ).
1051+
# Default: []
10501052
funcs:
10511053
- pkg.MyFunc
10521054
# Comma-separated list of names of methods of type func() string whose results must be used
10531055
# (in addition to default Error,String)
1054-
# Default []
1056+
# Default: []
10551057
stringmethods:
10561058
- MyMethod
10571059

10581060
# Disable all analyzers.
10591061
# Default: false
10601062
disable-all: true
1061-
# Enable analyzers by name (in addition to default).
1063+
# Enable analyzers by name.
1064+
# (in addition to default:
1065+
# appends, asmdecl, assign, atomic, bools, buildtag, cgocall, composites, copylocks, defers, directive, errorsas,
1066+
# framepointer, httpresponse, ifaceassert, loopclosure, lostcancel, nilfunc, printf, shift, sigchanyzer, slog,
1067+
# stdmethods, stringintconv, structtag, testinggoroutine, tests, timeformat, unmarshal, unreachable, unsafeptr,
1068+
# unusedresult
1069+
# ).
10621070
# Run `go tool vet help` to see all analyzers.
10631071
# Default: []
10641072
enable:
@@ -1107,6 +1115,10 @@ linters-settings:
11071115
# Default: false
11081116
enable-all: true
11091117
# Disable analyzers by name.
1118+
# (in addition to default
1119+
# atomicalign, deepequalerrors, fieldalignment, findcall, nilness, reflectvaluecompare, shadow, sortslice,
1120+
# timeformat, unusedwrite
1121+
# ).
11101122
# Run `go tool vet help` to see all analyzers.
11111123
# Default: []
11121124
disable:
@@ -1275,6 +1287,7 @@ linters-settings:
12751287
- k8s.io/klog/v2.InfoS # package level exported functions
12761288
- (github.com/go-logr/logr.Logger).Error # "Methods"
12771289
- (*go.uber.org/zap.SugaredLogger).With # Also "Methods", but with a pointer receiver
1290+
12781291
maintidx:
12791292
# Show functions with maintainability index lower than N.
12801293
# A high index indicates better maintainability (it's kind of the opposite of complexity).

0 commit comments

Comments
 (0)