mirror of
https://github.com/github/codeql.git
synced 2026-01-10 13:10:26 +01:00
The two files moved in this commit are referenced from the javascript/lib qlpack, but they are located in the javascript/src qlpack. This causes compile errors when running compile-ish commands for javascript queries. Moving the files fixes it.
22 lines
581 B
Plaintext
22 lines
581 B
Plaintext
/**
|
|
* @name Expression has no effect
|
|
* @description An expression that has no effect and is used in a void context is most
|
|
* likely redundant and may indicate a bug.
|
|
* @kind problem
|
|
* @problem.severity warning
|
|
* @id js/useless-expression
|
|
* @tags maintainability
|
|
* correctness
|
|
* external/cwe/cwe-480
|
|
* external/cwe/cwe-561
|
|
* @precision very-high
|
|
*/
|
|
|
|
import javascript
|
|
import Expressions.ExprHasNoEffect
|
|
import semmle.javascript.RestrictedLocations
|
|
|
|
from Expr e
|
|
where hasNoEffect(e)
|
|
select e.(FirstLineOf), "This expression has no effect."
|