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.
Some developers have their IDE/editors setup such that, when file is saved,
elm-formatis run to format the file. However, if thereelm-coder-generatormanipulates the file, the manipulated file would no longer beelm-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-validelm-format-validconsider the following scenario:
elm-coder-generatora file, don't save it in the IDE, commit the file to git-- [generator-start] .. -- [generator-end]-- [generator-start] .. -- [generator-end]if we can pass the generated code through
elm-format, the problem would be solved.