Skip to content

Commit 65ef38e

Browse files
authored
docs: improve ireturn documentation (#4881)
1 parent e95ac1b commit 65ef38e

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
@@ -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

.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)