Merge pull request #62 from ian-semmle/302_1_test

C++: Improve the JSF 3.02 rule 1 message, and add a test
This commit is contained in:
Geoffrey White
2018-08-15 17:22:33 +01:00
committed by GitHub
4 changed files with 617 additions and 3 deletions

View File

@@ -7,6 +7,7 @@
*/
import cpp
from Function f
where f.getMetrics().getNumberOfLinesOfCode() > 200
select f, "AV Rule 1: any one function (or method) will contain no more than 200 logical source lines of code."
from Function f, int n
where n = f.getMetrics().getNumberOfLinesOfCode()
and n > 200
select f, "AV Rule 1: any one function (or method) will contain no more than 200 logical source lines of code. Function '" + f.toString() + "' contains " + n.toString() + " lines of code."