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

Allow use ExConstructor to Be Declared Before defstruct #65

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

txssu
Copy link

@txssu txssu commented Oct 27, 2024

The requirement for use ExConstructor to appear after the defstruct can cause issues, such as:

  • Stylistic Conflicts: Tools like Styler and Credo may have rules that suggest placing use directives at the top of the module, leading to unnecessary warnings or errors in codebases that adhere to such style guides.
  • Readability: Placing the use directive at the top of a module is a more common convention in the Elixir community and improves the readability of the module's structure.

With this update, the use ExConstructor directive can now be placed before the defstruct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant