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: No Import #291

Closed
elbrujohalcon opened this issue Mar 1, 2023 · 0 comments
Closed

New rule: No Import #291

elbrujohalcon opened this issue Mar 1, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@elbrujohalcon
Copy link
Member

No Import

Brief Description

The idea is to ban the usage of import attributes.

-module bad.
-import io, [format/1].
-export [f/0].

f() -> format("BAD BAD BAD!\n").
-module good.
-export [f/0].

f() -> io:format("GOOD GOOD GOOD!\n").

Should be on by default?

YES

Options

  • None.

Reasoning

Writing fully-qualified names for functions is not that much of an extra effort and the resulting code is easier to comprehend (since readers will be immediately able to tell if a function is defined in the same module or not) and debug (since copy & pasting to try stuff on the console is easier).

@elbrujohalcon elbrujohalcon added this to the 3.0.0 milestone Mar 1, 2023
@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title No Import New rule: No Import Mar 1, 2023
@elbrujohalcon elbrujohalcon self-assigned this Mar 1, 2023
elbrujohalcon added a commit that referenced this issue Mar 1, 2023
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

1 participant