From ed6d9db174103e7841d93e1ae9a118790523d49f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 26 Dec 2021 13:56:57 +0200 Subject: [PATCH] checkers): treat //noinspection as pragma in commentFormatting (#1166) Used by some versions of GoLand and friends IDE's. --- checkers/commentFormatting_checker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/checkers/commentFormatting_checker.go b/checkers/commentFormatting_checker.go index 513eb246d..74eff3b09 100644 --- a/checkers/commentFormatting_checker.go +++ b/checkers/commentFormatting_checker.go @@ -27,6 +27,7 @@ func init() { `^//line /.*:\d+`, // e.g.: line /path/to/file:123 `^//export \w+$`, // e.g.: export Foo `^//[/+#-]+.*$`, // e.g.: vertical breaker ///////////// + `^//noinspection `, // e.g.: noinspection ALL, some GoLand and friends versions } pat := "(?m)" + strings.Join(parts, "|") pragmaRE := regexp.MustCompile(pat)