Skip to content

Passing the generated code through elm-format? #9

@qwfy

Description

@qwfy

Some developers have their IDE/editors setup such that, when file is saved, elm-format is run to format the file. However, if there elm-coder-generator manipulates the file, the manipulated file would no longer be elm-format-valid, depending on whether or not the developer saves the file again or not, the manipulate file would have two possible formats:

  • elm-format-valid
  • not elm-format-valid

consider the following scenario:

  • the developer elm-coder-generator a file, don't save it in the IDE, commit the file to git
  • the developer changes the above file, but in a section outside of -- [generator-start] .. -- [generator-end]
  • the developer saves it in the IDE
  • the file got reformatted, including what's in -- [generator-start] .. -- [generator-end]
  • the developer try to commit the work, but found lots of formatting changes, which is noisy, both to commit and to the later code review

if we can pass the generated code through elm-format, the problem would be solved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions