Created
June 13, 2016 20:30
-
-
Save kontext-e/375b665033e2680ab8a7f27861df716a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match (c:Git:Change)-[:MODIFIES]->(f:Git:File) | |
where f.relativePath=~'.*.java' | |
with replace(replace(f.relativePath,'/','.'), '.java','') as gitfqn, count(c) as cnt | |
order by cnt desc | |
limit 100 | |
match (cl:Jacoco:Class)--(m:Jacoco:Method)--(c:Jacoco:Counter {type: 'COMPLEXITY'}) | |
WHERE gitfqn=~('.*'+cl.fqn) AND c.missed + c.covered > 5 | |
AND NOT(m.signature = 'boolean equals(java.lang.Object)') | |
AND NOT(m.signature = 'int hashCode()') | |
AND NOT(cl.fqn =~ 'de.kontext_e.tim.jsf_ui.*') | |
WITH cnt, m AS method, cl.fqn AS fqn, m.signature AS signature, c.missed + c.covered AS complexity | |
MATCH (m)--(branches:Jacoco:Counter {type: 'BRANCH'}) | |
WHERE m = method AND branches.covered * 100 / (branches.covered + branches.missed) < 95 | |
RETURN cnt, fqn, signature, complexity, branches.covered * 100 / (branches.covered + branches.missed) AS coverage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment