Open Janiczek opened 8 years ago
@rtfeldman thoughts on this?
We don't know in advance (when we prompt the user) whether files will have errors. I'll propose that we attempt to format each file, saving it if it's successful, and then print out all the errors at the end.
I'd say for now do whatever's easiest to implement. I don't think we can make an informed decision on this until we see what it feels like to use it in the wild, and I'm sure people will open other issues if the chosen behavior becomes a pain in practice!
This also applies to #67.
Let's say we format a directory with .elm files:
The second one contains an error that will not allow us to format it. Should we (after displaying an error message) try to format the rest of the files (here third.elm)? (Right now we don't, we exit immediately.)