From 0bd228570c1bc9a087679825f236c4fc178517dd Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Tue, 11 Jun 2024 13:36:46 -0700 Subject: [PATCH] Backport of Configure linter to forbid use of html/template into release/1.19.x (#21310) * backport of commit d592c61e8432928b375ffa2f9466890599386e25 * backport of commit 950affbbe4755a9baa3360aa2b963fb813f23767 --------- Co-authored-by: Nathan Coleman --- .golangci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 3a6f56ec99..e530ce70bd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -75,7 +75,9 @@ linters-settings: simplify: true forbidigo: # Forbid the following identifiers (list of regexp). + # Format includes custom message based on https://github.com/ashanbrown/forbidigo/pull/11 forbid: + - '\bhtml\/template\b(# Use text/template instead)?' - '\bioutil\b(# Use io and os packages instead of ioutil)?' - '\brequire\.New\b(# Use package-level functions with explicit TestingT)?' - '\bassert\.New\b(# Use package-level functions with explicit TestingT)?'