From 8fd35b2bcd9b908cea23bdba9e01a885cc7921ab Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 24 Jul 2024 01:04:10 +0200 Subject: [PATCH] docs: improve ireturn documentation --- .golangci.next.reference.yml | 29 +++++++++++++++++++---------- .golangci.reference.yml | 29 +++++++++++++++++++---------- 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 62b7fd655fb2..ad01b36078ac 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -1240,26 +1240,35 @@ linters-settings: max: 5 ireturn: - # ireturn does not allow using `allow` and `reject` settings at the same time. - # Both settings are lists of the keywords and regular expressions matched to interface or package names. - # keywords: + # List of interfaces to allow. + # 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 - - # By default, it allows using errors, empty interfaces, anonymous interfaces, - # and interfaces provided by the standard library. + # + # Default: [anon, error, empty, stdlib] allow: - anon - - error - - empty - - stdlib # You can specify idiomatic endings for interface - (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: - github.com\/user\/package\/v4\.Type diff --git a/.golangci.reference.yml b/.golangci.reference.yml index fc9e73f27774..45b5376d70ee 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -1240,26 +1240,35 @@ linters-settings: max: 5 ireturn: - # ireturn does not allow using `allow` and `reject` settings at the same time. - # Both settings are lists of the keywords and regular expressions matched to interface or package names. - # keywords: + # List of interfaces to allow. + # 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 - - # By default, it allows using errors, empty interfaces, anonymous interfaces, - # and interfaces provided by the standard library. + # + # Default: [anon, error, empty, stdlib] allow: - anon - - error - - empty - - stdlib # You can specify idiomatic endings for interface - (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: - github.com\/user\/package\/v4\.Type