Files
codeql/go/ql/test/query-tests/RedundantCode/DuplicateCondition/tst.go
2026-06-11 07:15:54 +02:00

13 lines
188 B
Go

package main
func check(x int) bool {
return true
}
func main() {
if ok := check(42); ok { // $ Source
} else if ok { // $ Alert // NOT OK
} else if ok := check(23); ok { // OK
}
}