diff --git a/test/testdata/configs/gocritic.yml b/test/testdata/configs/gocritic.yml index e7796e6c48ba..019e6afb83fa 100644 --- a/test/testdata/configs/gocritic.yml +++ b/test/testdata/configs/gocritic.yml @@ -1,5 +1,3 @@ -run: - go: 1.14 linters-settings: gocritic: enabled-checks: @@ -7,7 +5,6 @@ linters-settings: - flagDeref - wrapperFunc - ruleguard - - syncMapLoadAndDelete # ignored because sync#Map.LoadAndDelete added in Go 1.15 settings: rangeValCopy: sizeThreshold: 2 diff --git a/test/testdata/gocritic.go b/test/testdata/gocritic.go index 93574c1678b7..afca6f3c479c 100644 --- a/test/testdata/gocritic.go +++ b/test/testdata/gocritic.go @@ -6,7 +6,6 @@ import ( "flag" "log" "strings" - "sync" ) var _ = *flag.Bool("global1", false, "") // want `flagDeref: immediate deref in \*flag.Bool\(.global1., false, ..\) is most likely an error; consider using flag\.BoolVar` @@ -47,13 +46,3 @@ func gocriticDup(x bool) { func gocriticRuleWrapperFunc() { strings.Replace("abcabc", "a", "d", -1) // want "ruleguard: this Replace call can be simplified.*" } - -func gocriticSink(args ...any) {} - -func gocriticIgnoreSyncMapLoadAndDelete(cond bool, m, m2 *sync.Map) { - actual, ok := m.Load("key") - if ok { - m.Delete("key") - gocriticSink(actual) - } -}