Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Rule: Unsafe usage of application #324

Open
paulo-ferraz-oliveira opened this issue Oct 10, 2023 · 1 comment
Open

New Rule: Unsafe usage of application #324

paulo-ferraz-oliveira opened this issue Oct 10, 2023 · 1 comment
Labels
Milestone

Comments

@paulo-ferraz-oliveira
Copy link
Collaborator

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

  1. not do it
  2. pull request the other application to expose proper config. access functions
@paulo-ferraz-oliveira
Copy link
Collaborator Author

This was basically inspired by Elixir's way of using compile_env (though not directly related to it).

@elbrujohalcon elbrujohalcon added this to the 4.1.0 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants