kibit icon indicating copy to clipboard operation
kibit copied to clipboard

--replace does not use sane indentation

Open jmromrell opened this issue 8 years ago • 2 comments

Currently, when kibit automatically makes multi-line changes, it will put the result on one very long line.

It would be great if it could do a bit of basic formatting. Even naive formatting would be easier to read and result in less manual work than none at all.

jmromrell avatar May 08 '17 15:05 jmromrell

My $0.02 on this is that kibit is not a formatter, it's a simplifier / linter. The new --replace option is a very alpha feature for supporting automatic simplification. Other tools such as cljfmt and sjacket are simply far better at (read; designed for) code formatting whereas kibit is not.

arrdem avatar May 09 '17 03:05 arrdem

I'd agree with you, except kibit already formats suggested changes using pprint. I looked over the source earlier, and it looks as though the replace code should be utilizing pprint as well, so I'm not exactly sure why it wasn't formatting for me, but it does appear to be a bug.

jmromrell avatar May 09 '17 03:05 jmromrell