From 1cf295872281d14478f31540ba1c5074249c45d9 Mon Sep 17 00:00:00 2001 From: Takaya Yamazoe Date: Wed, 19 May 2021 17:37:10 +0900 Subject: [PATCH 1/3] fix example: pattern of forbidigo --- .golangci.example.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index fd2f2cc6e8d1..fb0b30f31859 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -145,9 +145,9 @@ linters-settings: forbidigo: # Forbid the following identifiers forbid: - - fmt.Errorf # consider errors.Errorf in github.com/pkg/errors - - fmt.Print.* # too much log noise - - ginkgo\\.F.* # these are used just for local development + - ^fmt\.Errorf$ # consider errors.Errorf in github.com/pkg/errors + - ^fmt\.Print.*$ # too much log noise + - ^ginkgo\.F[A-Z].*$ # these are used just for local development # Exclude godoc examples from forbidigo checks. Default is true. exclude_godoc_examples: false From 71181e76d3ceb7867f97dbdbe0cfa566b4ab8b35 Mon Sep 17 00:00:00 2001 From: ytakaya Date: Wed, 19 May 2021 22:54:56 +0900 Subject: [PATCH 2/3] fix example of forbidigo --- .golangci.example.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index fb0b30f31859..fb431f7e0958 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -145,9 +145,8 @@ linters-settings: forbidigo: # Forbid the following identifiers forbid: - - ^fmt\.Errorf$ # consider errors.Errorf in github.com/pkg/errors - - ^fmt\.Print.*$ # too much log noise - - ^ginkgo\.F[A-Z].*$ # these are used just for local development + - ^print.*$ # Identifiers are written using regexp. + - 'fmt\.Print.*' # Exclude godoc examples from forbidigo checks. Default is true. exclude_godoc_examples: false From c2e46f50e0e229e8cbaf19ffd8e67736f74732d2 Mon Sep 17 00:00:00 2001 From: ytakaya Date: Wed, 19 May 2021 23:57:25 +0900 Subject: [PATCH 3/3] fix comment in example of forbidigo --- .golangci.example.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index fb431f7e0958..988b4d28b63b 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -143,9 +143,9 @@ linters-settings: - 'example.com/package.ExampleStruct' forbidigo: - # Forbid the following identifiers + # Forbid the following identifiers (identifiers are written using regexp): forbid: - - ^print.*$ # Identifiers are written using regexp. + - ^print.*$ - 'fmt\.Print.*' # Exclude godoc examples from forbidigo checks. Default is true. exclude_godoc_examples: false