kkinnear / zprint

Executables, uberjar, and library to beautifully format Clojure and Clojurescript source code and s-expressions.
MIT License
547 stars 46 forks source link

Errors encountered when applying multiple styles may not be reported #311

Closed kkinnear closed 4 months ago

kkinnear commented 5 months ago

When applying multiple styles, for example {:style [:style-a :style-b]}, if an error is detected when applying :style-a, some errors will be lost and not reported. In these cases, :style-a will not actually be applied, but no indication of that failure will be available to the user. Errors from the final style in a vector, in this case :style-b, will be detected and properly reported to the user.

kkinnear commented 4 months ago

This is fixed in 1.2.9.

This has now been fixed to detect and report errors from any styles where there was a failure to apply the style. There is a small chance that this will appear to break some working configurations, since if there were errors applying multiple styles some of those errors would not currently be reported if they were not associated with the final style. In any situations where these errors suddenly appear, it signals errors that were not properly exposed to the user that are now being reported. You can restore the previous behavior by simply removing the style that causes an error, since it was not being applied previously. You may instead want to figure out how to get the benefit of actually applying that style by correcting the error, since that was probably the original intent.