Files
codeql/cpp/ql/src/Metrics/Files/FLinesOfCommentedOutCode.ql
Cornelius Riemenschneider 47530d7526 C++: Fix query metadata warnings.
2021-03-24 18:01:21 +01:00

17 lines
469 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 cpp/lines-of-commented-out-code-in-files
* @tags documentation
*/
import Documentation.CommentedOutCode
from File f, int n
where n = sum(CommentedOutCode comment | comment.getFile() = f | comment.numCodeLines())
select f, n order by n desc