Presubmit.Source.Index (presubmit v0.2.2)

Copy Markdown View Source

Tree-wide discovery of modules, for invariants that need to look beyond the files a commit changed: "some router routes this controller", "some supervisor starts this server", "a test module exists for this module".

Every Elixir file matching the pattern is parsed once per tree object (see Presubmit.Source.Facts), so repeated discovery on the same revision is cheap.

Summary

Functions

The module named name in tree, if any file matching pattern defines it.

Every module defined in files of tree matching pattern.

Functions

find(tree, name, pattern \\ Presubmit.Paths.elixir_source())

The module named name in tree, if any file matching pattern defines it.

modules(tree, pattern \\ Presubmit.Paths.elixir_source())

Every module defined in files of tree matching pattern.