KogenCredo.Check.Warning.PathExpandPriv (KogenCredo v0.1.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of low and works with any version of Elixir.
Explanation
Relative priv/... paths depend on the working directory. They work under mix and fail in a
release. Resolve them with Application.app_dir(:my_app, "priv/...") or :code.priv_dir(:my_app).
Check-Specific Parameters
Use the following parameters to configure this check:
:included_paths
Only files under these path prefixes are checked.
This parameter defaults to ["lib/", "config/"].
:excluded_paths
Files under these path prefixes are skipped (Mix tasks by default).
This parameter defaults to ["lib/mix/"].
:check_file_calls
Also report File.read/1-style calls with a literal priv path.
This parameter defaults to true.
:file_functions
File functions checked when check_file_calls is on.
This parameter defaults to [:read, :read!, :stream!, :ls, :ls!, :exists?, :dir?, :regular?].
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.