View Source Credo.Sources (Credo v1.7.5)

This module is used to find and read all source files for analysis.

Summary

Functions

Finds sources for a given Credo.Execution.

Finds sources in a given directory using a list of included and excluded patterns. For included, patterns can be file paths, directory paths and globs. For excluded, patterns can also be specified as regular expressions.

Functions

Finds sources for a given Credo.Execution.

Through the files key, configs may contain a list of included and excluded patterns. For included, patterns can be file paths, directory paths and globs. For excluded, patterns can also be specified as regular expressions.

iex> Sources.find(%Credo.Execution{files: %{excluded: ["not_me.ex"], included: ["*.ex"]}})

iex> Sources.find(%Credo.Execution{files: %{excluded: [~r/messy/], included: ["lib/mix", "root.ex"]}})
Link to this function

find_in_dir(working_dir, included, excluded)

View Source

Finds sources in a given directory using a list of included and excluded patterns. For included, patterns can be file paths, directory paths and globs. For excluded, patterns can also be specified as regular expressions.

iex> Sources.find_in_dir("/home/rrrene/elixir", ["*.ex"], ["not_me.ex"])

iex> Sources.find_in_dir("/home/rrrene/elixir", ["*.ex"], [~r/messy/])