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

Formatting all elm files in a directory #16

Closed
avh4 opened this issue Oct 20, 2015 · 3 comments
Closed

Formatting all elm files in a directory #16

avh4 opened this issue Oct 20, 2015 · 3 comments

Comments

@avh4
Copy link
Owner

avh4 commented Oct 20, 2015

elm-format src (src is a directory) should format all *.elm files found (recursively) in the given directory.

Using --output FILE with a directory should exit with an error message.

The following prompt should be given (unless --yes is specified):

This will overwrite the following 4 files to use Elm’s preferred style:

  src/TodoMVC.elm
  src/TodoMVC/Model.elm
  src/TodoMVC/Update.elm
  src/TodoMVC/View.elm

This cannot be undone! Make sure to back up these files before proceeding.

Are you sure you want to overwrite these files with formatted versions? (y/N)
@avh4 avh4 modified the milestone: alpha Oct 21, 2015
@Janiczek
Copy link
Contributor

What should be the behaviour when you have eg. 3 .elm files and the first one has compiler errors in it?

  • print something, exitFailure (leaving the remaining files as are)
  • print something, and continue parsing the rest of the files?

@avh4
Copy link
Owner Author

avh4 commented Oct 23, 2015

I'd say do the simplest option that seems technically correct to you, and open a new issue to discuss whether we want to handle it in a more complicated way.

@avh4
Copy link
Owner Author

avh4 commented Oct 26, 2015

Fixed in #41

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

No branches or pull requests

2 participants