Files
codeql/python/ql/src/Lexical/FCommentedOutCode.ql
Erik Krogh Kristensen a96489b23d delete duplicate imports
2022-04-22 12:41:30 +02:00

17 lines
456 B
Plaintext

/**
* @name Lines of commented-out code in files
* @description The number of lines of commented out code per file
* @kind treemap
* @treemap.warnOn highValues
* @metricType file
* @tags maintainability
* @id py/lines-of-commented-out-code-in-files
*/
import python
import Lexical.CommentedOutCode
from File f, int n
where n = count(CommentedOutCodeLine c | not c.maybeExampleCode() and c.getLocation().getFile() = f)
select f, n order by n desc