mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
24 lines
591 B
Plaintext
24 lines
591 B
Plaintext
/**
|
|
* @name Commented-out code
|
|
* @description Commented-out code makes the remaining code more difficult to read.
|
|
* @kind problem
|
|
* @problem.severity recommendation
|
|
* @precision medium
|
|
* @id cs/commented-out-code
|
|
* @tags quality
|
|
* maintainability
|
|
* readability
|
|
*/
|
|
|
|
import csharp
|
|
|
|
class CommentedOutCode extends CommentBlock {
|
|
CommentedOutCode() {
|
|
not this.isXmlCommentBlock() and
|
|
2 * count(this.getAProbableCodeLine()) > count(this.getANonEmptyLine())
|
|
}
|
|
}
|
|
|
|
from CommentedOutCode comment
|
|
select comment, "This comment appears to contain commented-out code."
|