Files
codeql/python/ql/src/Expressions/CompareIdenticalValuesMissingSelf.ql
Joe Farebrother 869e33e38c Tag 'linter-like' quality queries that use pointto
Excluded for now: unnecassary-delete; since the pattern is often intentional to break reference cycles, which the query doesn't account for; so uncertain about its claim of high precision
2025-06-19 14:07:15 +01:00

22 lines
580 B
Plaintext

/**
* @name Maybe missing 'self' in comparison
* @description Comparison of identical values, the intent of which is unclear.
* @kind problem
* @tags quality
* reliability
* correctness
* external/cwe/cwe-570
* external/cwe/cwe-571
* @problem.severity warning
* @sub-severity high
* @precision very-high
* @id py/comparison-missing-self
*/
import python
import Expressions.RedundantComparison
from RedundantComparison comparison
where comparison.maybeMissingSelf()
select comparison, "Comparison of identical values; may be missing 'self'."