exconstructor icon indicating copy to clipboard operation
exconstructor copied to clipboard

Allow use ExConstructor to Be Declared Before defstruct

Open txssu opened this issue 1 year ago • 1 comments

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.

txssu avatar Oct 27 '24 13:10 txssu

@rubemz I’d appreciate it if you could review this PR when you get a chance.

txssu avatar Mar 24 '25 16:03 txssu