mirror of
https://github.com/github/codeql.git
synced 2026-04-17 13:04:02 +02:00
20 lines
470 B
Plaintext
20 lines
470 B
Plaintext
/**
|
|
* @name Locking the 'this' object in a lock statement
|
|
* @description It is bad practice to lock the 'this' object because
|
|
* it might be locked elsewhere.
|
|
* @kind problem
|
|
* @problem.severity warning
|
|
* @precision high
|
|
* @id cs/lock-this
|
|
* @tags reliability
|
|
* maintainability
|
|
* modularity
|
|
* external/cwe/cwe-662
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from LockStmt s, ThisAccess a
|
|
where a = s.getExpr()
|
|
select a, "'this' used in lock statement."
|