Debian Codegraph @

gopls/internal/test/marker/testdata/diagnostics/rundespiteerrors.txt

raw
1 This test verifies that analyzers without RunDespiteErrors are not
2 executed on a package containing type errors (see issue #54762).
3
4 -- go.mod --
5 module example.com
6 go 1.12
7
8 -- a.go --
9 package a
10
11 func _() {
12 // A type error.
13 _ = 1 + "" //@diag(`1 + ""`, re"mismatched types|cannot convert")
14
15 // A violation of an analyzer for which RunDespiteErrors=false:
16 // no (simplifyrange, warning) diagnostic is produced; the diag
17 // comment is merely illustrative.
18 for _ = range "" { //diag("for _", "simplify range expression", )
19
20 }
21 }