mirror of
https://github.com/github/codeql.git
synced 2025-12-28 14:46:33 +01:00
20 lines
461 B
Plaintext
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 + "."
|