mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
11 lines
239 B
Plaintext
11 lines
239 B
Plaintext
import java
|
|
|
|
class EmptyBlock extends Block {
|
|
EmptyBlock() { this.getNumStmt() = 0 }
|
|
}
|
|
|
|
from IfStmt ifstmt
|
|
where
|
|
ifstmt.getThen() instanceof EmptyBlock and
|
|
not exists(ifstmt.getElse())
|
|
select ifstmt, "This if-statement is redundant." |