Files
codeql/go/ql/test/query-tests/AlertSuppression/tst.go
2022-12-19 16:43:11 +01:00

58 lines
1.6 KiB
Go

package main
// autoformat-ignore (avoid gofmt changing line-endings, which should be specifically LFs here)
func main() {
x := 42
x = x // lgtm
x = x // lgtm[go/redundant-assignment]
x = x // lgtm[go/redundant-assignment]
x = x // lgtm[go/redundant-assignment, go/redundant-operation]
x = x // lgtm[@tag:nullness]
x = x // lgtm[@tag:nullness,go/redundant-assignment]
x = x // lgtm[@expires:2017-06-11]
x = x // lgtm[go/redundant-operation] because I know better than lgtm
x = x // lgtm: blah blah
x = x // lgtm blah blah #falsepositive
x = x //lgtm [go/redundant-operation]
x = x /* lgtm */
x = x // lgtm[]
x = x // lgtmfoo
x = x //lgtm
x = x // lgtm
x = x // lgtm [go/redundant-assignment]
x = x // foolgtm[go/redundant-assignment]
x = x // foolgtm
x = x // foo; lgtm
x = x // foo; lgtm[go/redundant-assignment]
x = x // foo lgtm
x = x // foo lgtm[go/redundant-assignment]
x = x // foo lgtm bar
x = x // foo lgtm[go/redundant-assignment] bar
x = x // LGTM!
x = x // LGTM[go/redundant-assignment]
x = x // lgtm[go/redundant-assignment] and lgtm[go/redundant-operation]
x = x // lgtm[go/redundant-assignment]; lgtm
x = x /* lgtm[] */
x = x /* lgtm[go/redundant-assignment] */
x = x /* lgtm
*/
x = x /* lgtm
*/
x = x /* lgtm[@tag:nullness,go/redundant-assignment] */
x = x /* lgtm[@tag:nullness] */
// codeql[js/debugger-statement]
x = x
// CODEQL[js/debugger-statement]
x = x
// codeql[js/debugger-statement] -- because I know better than codeql
x = x
/* codeql[js/debugger-statement] */
x = x
/* codeql[js/debugger-statement]
*/
x = x
x = x // codeql[js/debugger-statement]
}