[PATCH] D116638: [clang-format] Fix ignoring JavaScriptWrapImport when ColumnWidth: 0

Andrey Mishchenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 6 06:28:23 PST 2022


andmis added a comment.

My guess that `ColumnLimit: 0` is rarely used for JS is based on the objective fact that JS import formatting is (IMO very) buggy with the column limit set that way, and it took several years for us to hear a bug report about it. And "we should not make assumptions about what people will want" applies just as well to the proposal of force-wrapping at >= 2 imports.

I agree that `AlwaysWrap`/`NeverWrap`/`LeaveExistingWraps` is clearer and better than `true`/`false`. But we still have no answer for the semantics of `LeaveExistingWraps` in edge cases. Are we saying that we should not merge this bugfix without figuring out the answer to the semantics question and/or changing the option to an enum?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116638/new/

https://reviews.llvm.org/D116638



More information about the cfe-commits mailing list