Last active
November 28, 2015 20:25
-
-
Save kontext-e/a5da831e6efe5741cc43 to your computer and use it in GitHub Desktop.
From Book "Your Code As a Crime Scene" Cypher query for hotspots
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 | |
(l:Linecount), (g:GitFile) | |
WHERE | |
g.relativePath =~ ('.*'+l.name) | |
WITH | |
distinct g, l.linecount as linecount | |
MATCH | |
(g)--(cf:GitCommitFile) | |
RETURN | |
g.relativePath, count(cf) as revisions, linecount | |
ORDER BY | |
revisions desc, linecount desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment