KogenCredo.Check.Warning.RuntimeEnvDevDefault (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 high and works with any version of Elixir.
Explanation
Hardcoded developer-machine paths in System.get_env/2 defaults will cause the
application to silently read from a non-existent path on production servers.
Examples
Bad:
# config/runtime.exs
codegen_dir = System.get_env("CODEGEN_DIR", "/Users/me/codegen")Good:
# config/runtime.exs
codegen_dir = System.get_env("CODEGEN_DIR")
# Require the var to be set in prod; use a .env file locally.Check-Specific Parameters
There are no specific parameters for this check.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.