exconstructor
exconstructor copied to clipboard
Allow use ExConstructor to Be Declared Before defstruct
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.
@rubemz I’d appreciate it if you could review this PR when you get a chance.