Skip to content

Commit 09ff2b7

Browse files
ldezuudashr
authored andcommitted
docs: improve ireturn documentation (golangci#4881)
1 parent ce06a42 commit 09ff2b7

File tree

2 files changed

+38
-20
lines changed

2 files changed

+38
-20
lines changed

.golangci.next.reference.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -1251,26 +1251,35 @@ linters-settings:
12511251
max: 5
12521252

12531253
ireturn:
1254-
# ireturn does not allow using `allow` and `reject` settings at the same time.
1255-
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
1256-
# keywords:
1254+
# List of interfaces to allow.
1255+
# Lists of the keywords and regular expressions matched to interface or package names can be used.
1256+
# `allow` and `reject` settings cannot be used at the same time.
1257+
#
1258+
# Keywords:
12571259
# - `empty` for `interface{}`
12581260
# - `error` for errors
12591261
# - `stdlib` for standard library
12601262
# - `anon` for anonymous interfaces
12611263
# - `generic` for generic interfaces added in go 1.18
1262-
1263-
# By default, it allows using errors, empty interfaces, anonymous interfaces,
1264-
# and interfaces provided by the standard library.
1264+
#
1265+
# Default: [anon, error, empty, stdlib]
12651266
allow:
12661267
- anon
1267-
- error
1268-
- empty
1269-
- stdlib
12701268
# You can specify idiomatic endings for interface
12711269
- (or|er)$
12721270

1273-
# reject-list of interfaces
1271+
# List of interfaces to reject.
1272+
# Lists of the keywords and regular expressions matched to interface or package names can be used.
1273+
# `allow` and `reject` settings cannot be used at the same time.
1274+
#
1275+
# Keywords:
1276+
# - `empty` for `interface{}`
1277+
# - `error` for errors
1278+
# - `stdlib` for standard library
1279+
# - `anon` for anonymous interfaces
1280+
# - `generic` for generic interfaces added in go 1.18
1281+
#
1282+
# Default: []
12741283
reject:
12751284
- github.com\/user\/package\/v4\.Type
12761285

.golangci.reference.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -1240,26 +1240,35 @@ linters-settings:
12401240
max: 5
12411241

12421242
ireturn:
1243-
# ireturn does not allow using `allow` and `reject` settings at the same time.
1244-
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
1245-
# keywords:
1243+
# List of interfaces to allow.
1244+
# Lists of the keywords and regular expressions matched to interface or package names can be used.
1245+
# `allow` and `reject` settings cannot be used at the same time.
1246+
#
1247+
# Keywords:
12461248
# - `empty` for `interface{}`
12471249
# - `error` for errors
12481250
# - `stdlib` for standard library
12491251
# - `anon` for anonymous interfaces
12501252
# - `generic` for generic interfaces added in go 1.18
1251-
1252-
# By default, it allows using errors, empty interfaces, anonymous interfaces,
1253-
# and interfaces provided by the standard library.
1253+
#
1254+
# Default: [anon, error, empty, stdlib]
12541255
allow:
12551256
- anon
1256-
- error
1257-
- empty
1258-
- stdlib
12591257
# You can specify idiomatic endings for interface
12601258
- (or|er)$
12611259

1262-
# reject-list of interfaces
1260+
# List of interfaces to reject.
1261+
# Lists of the keywords and regular expressions matched to interface or package names can be used.
1262+
# `allow` and `reject` settings cannot be used at the same time.
1263+
#
1264+
# Keywords:
1265+
# - `empty` for `interface{}`
1266+
# - `error` for errors
1267+
# - `stdlib` for standard library
1268+
# - `anon` for anonymous interfaces
1269+
# - `generic` for generic interfaces added in go 1.18
1270+
#
1271+
# Default: []
12631272
reject:
12641273
- github.com\/user\/package\/v4\.Type
12651274

0 commit comments

Comments
 (0)