elvis_core
elvis_core copied to clipboard
New Rule: Unsafe usage of application
Name
unsafe_application_get
Brief Description
In the context of an application, while it's technically possible to do application:get_env(_)
for another application, it's usually a bad idea.
Reasoning
Very easy to break if you don't read between the lines, and also indicating that the other application is potentially missing an API function for the same thing.
Refactoring Proposal
- not do it
- pull request the other application to expose proper config. access functions
This was basically inspired by Elixir's way of using compile_env
(though not directly related to it).