Files
codeql/java/ql/src/Metrics/Files/FLinesOfCommentedCode.ql
2021-03-25 09:52:05 +01:00

18 lines
515 B
Plaintext

/**
* @name Lines of commented-out code in files
* @description The number of lines of commented-out code in a file.
* @kind treemap
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @id java/lines-of-commented-out-code-in-files
* @tags maintainability
* documentation
*/
import Violations_of_Best_Practice.Comments.CommentedCode
from File f, int n
where n = sum(CommentedOutCode comment | comment.getFile() = f | comment.getCodeLines())
select f, n order by n desc