From 22a416f7f2e32f9fc2ffc9055e67b804a39aaf36 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 17 Feb 2022 14:57:44 +0000 Subject: tools/syz-linter: add go:embed to exceptions No space is allowed between // and go:embed. Make linter not throw a warning about it. --- tools/syz-linter/linter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/syz-linter/linter.go b/tools/syz-linter/linter.go index 3afc84ca4..52da71b1f 100644 --- a/tools/syz-linter/linter.go +++ b/tools/syz-linter/linter.go @@ -145,7 +145,7 @@ var ( noPeriodComment = regexp.MustCompile(`^// [A-Z][a-z].+[a-z]$`) lowerCaseComment = regexp.MustCompile(`^// [a-z]+ `) onelineExceptions = regexp.MustCompile(`// want \"|http:|https:`) - specialComment = regexp.MustCompile(`//go:generate|//go:build|// nolint:`) + specialComment = regexp.MustCompile(`//go:generate|//go:build|//go:embed|// nolint:`) ) // checkStringLenCompare checks for string len comparisons with 0. -- cgit mrf-deployment