docs: improve ireturn documentation (#4881)
This commit is contained in:
parent
e95ac1b659
commit
65ef38e5c2
@ -1240,26 +1240,35 @@ linters-settings:
|
|||||||
max: 5
|
max: 5
|
||||||
|
|
||||||
ireturn:
|
ireturn:
|
||||||
# ireturn does not allow using `allow` and `reject` settings at the same time.
|
# List of interfaces to allow.
|
||||||
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
|
# Lists of the keywords and regular expressions matched to interface or package names can be used.
|
||||||
# keywords:
|
# `allow` and `reject` settings cannot be used at the same time.
|
||||||
|
#
|
||||||
|
# Keywords:
|
||||||
# - `empty` for `interface{}`
|
# - `empty` for `interface{}`
|
||||||
# - `error` for errors
|
# - `error` for errors
|
||||||
# - `stdlib` for standard library
|
# - `stdlib` for standard library
|
||||||
# - `anon` for anonymous interfaces
|
# - `anon` for anonymous interfaces
|
||||||
# - `generic` for generic interfaces added in go 1.18
|
# - `generic` for generic interfaces added in go 1.18
|
||||||
|
#
|
||||||
# By default, it allows using errors, empty interfaces, anonymous interfaces,
|
# Default: [anon, error, empty, stdlib]
|
||||||
# and interfaces provided by the standard library.
|
|
||||||
allow:
|
allow:
|
||||||
- anon
|
- anon
|
||||||
- error
|
|
||||||
- empty
|
|
||||||
- stdlib
|
|
||||||
# You can specify idiomatic endings for interface
|
# You can specify idiomatic endings for interface
|
||||||
- (or|er)$
|
- (or|er)$
|
||||||
|
|
||||||
# reject-list of interfaces
|
# List of interfaces to reject.
|
||||||
|
# Lists of the keywords and regular expressions matched to interface or package names can be used.
|
||||||
|
# `allow` and `reject` settings cannot be used at the same time.
|
||||||
|
#
|
||||||
|
# Keywords:
|
||||||
|
# - `empty` for `interface{}`
|
||||||
|
# - `error` for errors
|
||||||
|
# - `stdlib` for standard library
|
||||||
|
# - `anon` for anonymous interfaces
|
||||||
|
# - `generic` for generic interfaces added in go 1.18
|
||||||
|
#
|
||||||
|
# Default: []
|
||||||
reject:
|
reject:
|
||||||
- github.com\/user\/package\/v4\.Type
|
- github.com\/user\/package\/v4\.Type
|
||||||
|
|
||||||
|
@ -1240,26 +1240,35 @@ linters-settings:
|
|||||||
max: 5
|
max: 5
|
||||||
|
|
||||||
ireturn:
|
ireturn:
|
||||||
# ireturn does not allow using `allow` and `reject` settings at the same time.
|
# List of interfaces to allow.
|
||||||
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
|
# Lists of the keywords and regular expressions matched to interface or package names can be used.
|
||||||
# keywords:
|
# `allow` and `reject` settings cannot be used at the same time.
|
||||||
|
#
|
||||||
|
# Keywords:
|
||||||
# - `empty` for `interface{}`
|
# - `empty` for `interface{}`
|
||||||
# - `error` for errors
|
# - `error` for errors
|
||||||
# - `stdlib` for standard library
|
# - `stdlib` for standard library
|
||||||
# - `anon` for anonymous interfaces
|
# - `anon` for anonymous interfaces
|
||||||
# - `generic` for generic interfaces added in go 1.18
|
# - `generic` for generic interfaces added in go 1.18
|
||||||
|
#
|
||||||
# By default, it allows using errors, empty interfaces, anonymous interfaces,
|
# Default: [anon, error, empty, stdlib]
|
||||||
# and interfaces provided by the standard library.
|
|
||||||
allow:
|
allow:
|
||||||
- anon
|
- anon
|
||||||
- error
|
|
||||||
- empty
|
|
||||||
- stdlib
|
|
||||||
# You can specify idiomatic endings for interface
|
# You can specify idiomatic endings for interface
|
||||||
- (or|er)$
|
- (or|er)$
|
||||||
|
|
||||||
# reject-list of interfaces
|
# List of interfaces to reject.
|
||||||
|
# Lists of the keywords and regular expressions matched to interface or package names can be used.
|
||||||
|
# `allow` and `reject` settings cannot be used at the same time.
|
||||||
|
#
|
||||||
|
# Keywords:
|
||||||
|
# - `empty` for `interface{}`
|
||||||
|
# - `error` for errors
|
||||||
|
# - `stdlib` for standard library
|
||||||
|
# - `anon` for anonymous interfaces
|
||||||
|
# - `generic` for generic interfaces added in go 1.18
|
||||||
|
#
|
||||||
|
# Default: []
|
||||||
reject:
|
reject:
|
||||||
- github.com\/user\/package\/v4\.Type
|
- github.com\/user\/package\/v4\.Type
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user