From 92e8582d09b91e881fa364aa48052c30c5d2040c Mon Sep 17 00:00:00 2001 From: Craig Furman Date: Fri, 18 Feb 2022 13:52:10 +0000 Subject: [PATCH] Add forbidigo example that uses comments --- .golangci.example.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.example.yml b/.golangci.example.yml index 342d96b65191..4e8caf868e79 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -280,6 +280,9 @@ linters-settings: forbid: - ^print.*$ - 'fmt\.Print.*' + # Optionally put comments at the end of the regex, surrounded by `(# )?` + # Escape any special characters. + - 'fmt\.Print.*(# Do not commit print statements\.)?' # Exclude godoc examples from forbidigo checks. # Default: true exclude_godoc_examples: false