From a43fe64572ca20c576cc2ae017b442416eef9f89 Mon Sep 17 00:00:00 2001 From: Denis Krivak Date: Sat, 19 Aug 2023 15:46:36 +0200 Subject: [PATCH] Don`t check test example comments. --- checks.go | 3 +++ checks_test.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/checks.go b/checks.go index cba54f3..f5471cd 100644 --- a/checks.go +++ b/checks.go @@ -240,6 +240,9 @@ func isSpecialBlock(comment string) bool { strings.Contains(comment, "#define")) { return true } + if strings.HasPrefix(comment, "// Output: ") { + return true + } return false } diff --git a/checks_test.go b/checks_test.go index 113fabe..aca3ef2 100644 --- a/checks_test.go +++ b/checks_test.go @@ -248,6 +248,11 @@ func TestIsSpecialBlock(t *testing.T) { */`, isSpecial: true, }, + { + name: "Test output", + comment: "// Output: true", + isSpecial: true, + }, } for _, tt := range testCases {