From 460931a5d218362c52f8ae20b015935d776f6d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 16 Dec 2021 11:28:40 +0200 Subject: [PATCH] checkers(commentFormatting): treat //noinspection as pragma 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)