greglook / cljstyle

A tool for formatting Clojure code
Eclipse Public License 1.0
293 stars 39 forks source link

Fix formatting when there's an inline comment on the final line #66

Closed drewinglis closed 3 years ago

drewinglis commented 3 years ago

This includes a test case to illustrate the issue.

The TLDR is that rewrite-clj treats comments as whitespace, so if there is a trailing comment on the final line of a form, cljstyle would tell you to remove the space between the form and the comment because it considered the whole rest of the line to be whitespace.