From 9b966a447ee08045170e476b4f69c43af9e0c5e8 Mon Sep 17 00:00:00 2001 From: Edoardo Tenani Date: Thu, 18 Oct 2018 01:13:56 +0200 Subject: [PATCH] add test case for strings.Builder G104 whitelist inclusion --- testutils/source.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testutils/source.go b/testutils/source.go index d680851..1b398e2 100644 --- a/testutils/source.go +++ b/testutils/source.go @@ -164,6 +164,12 @@ func test() error { func main() { e := test() fmt.Println(e) +}`}, 0}, {[]string{` +package main +import "strings" +func main() { + var buf strings.Builder + buf.WriteString("test string") }`}, 0}} // SampleCodeG105 - bignum overflow