View Source Credo.ConfigFile (Credo v1.6.4)

ConfigFile structs represent all loaded and merged config files in a run.

Link to this section Summary

Functions

Merges the given structs from left to right, meaning that later entries overwrites earlier ones.

Returns the provided config_file merged into the default configuration.

Returns Execution struct representing a consolidated Execution for all .credo.exs files in relevant_directories/1 merged into the default configuration.

Returns all parent directories of the given dir as well as each ./config sub-directory.

Link to this section Functions

Merges the given structs from left to right, meaning that later entries overwrites earlier ones.

merge(base, other)

Any options in other will overwrite those in base.

The files: field is merged, meaning that you can define included and/or excluded and only override the given one.

The checks: field is merged.

Link to this function

merge_checks(config_file1, config_file2)

View Source
Link to this function

merge_files(config_file1, config_file2)

View Source
Link to this function

read_from_file_path(exec, dir, config_filename, config_name \\ nil, safe \\ false)

View Source

Returns the provided config_file merged into the default configuration.

  • config_file: full path to the custom configuration file
  • config_name: name of the configuration to load
  • safe: if +true+, the config files are loaded using static analysis rather
        than `Code.eval_string/1`
Link to this function

read_or_default(exec, dir, config_name \\ nil, safe \\ false)

View Source

Returns Execution struct representing a consolidated Execution for all .credo.exs files in relevant_directories/1 merged into the default configuration.

  • config_name: name of the configuration to load
  • safe: if +true+, the config files are loaded using static analysis rather
        than `Code.eval_string/1`
Link to this function

relevant_directories(dir)

View Source

Returns all parent directories of the given dir as well as each ./config sub-directory.