eclipse-archived / ceylon.formatter

A formatter for the Ceylon programming language, written in Ceylon.
Apache License 2.0
14 stars 11 forks source link

Add a way to make the formatter fail-fast #28

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

There should be some way to make the formatter fail-fast: handleException should then rethrow the exception and thus end the formatting immediately. This would be especially useful for testing (for example, the test for #27 currently “succeeds” even if it fails – the difference is only that in one case a stacktrace is printed and in the other case not) and development in general.

I’m not sure if this needs to be a regular option or a parameter of FormattingVisitor. I’m leaning towards the latter, since it doesn’t influence how the code looks, and it’s mostly for internal use.

lucaswerkmeister commented 10 years ago

OTOH, there probably should be a command-line option for it, and regular options get command-line options for free...