From 374b3fd206682aa561784816cbdc7d2605717307 Mon Sep 17 00:00:00 2001 From: Craig Furman Date: Sat, 19 Feb 2022 12:07:10 +0000 Subject: [PATCH] docs: add forbidigo example that uses comments (#2599) --- .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