Skip to content

Instantly share code, notes, and snippets.

@vladbatushkov
Created February 20, 2022 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladbatushkov/3f8697dc55834163dfc80b5f4fc8e871 to your computer and use it in GitHub Desktop.
Save vladbatushkov/3f8697dc55834163dfc80b5f4fc8e871 to your computer and use it in GitHub Desktop.
Detect dependencies from the outside
UNWIND ['module1.*', 'module2.*', 'module3.*'] as module
CALL {
WITH module
MATCH (s:File)-[:DEPENDS_ON]->(d:File)
WHERE s.name =~ module
AND NOT d.name =~ module
AND NOT d.name =~ 'common.*'
RETURN DISTINCT s.name as subject,
d.name as dependency
}
RETURN subject, dependency
ORDER BY subject
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment