Files
codeql/java/ql/src/Language Abuse/EmptyStatement.ql
Anders Schack-Mulligen ae44b90456 Java: Normalize parentheses.
2018-11-28 15:01:25 +01:00

20 lines
461 B
Plaintext

/**
* @name Empty statement
* @description An empty statement hinders readability.
* @kind problem
* @problem.severity recommendation
* @precision low
* @id java/empty-statement
* @tags maintainability
* useless-code
*/
import java
from EmptyStmt empty, string action
where
if exists(LoopStmt l | l.getBody() = empty)
then action = "turned into '{}'"
else action = "deleted"
select empty, "This empty statement should be " + action + "."