[PATCH] D21273: clang-format: [JS] Introduce WrapJavaScriptImports option.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 07:33:50 PDT 2016


djasper added inline comments.

================
Comment at: lib/Format/TokenAnnotator.cpp:789
@@ -788,3 +788,3 @@
     if (Style.Language == FormatStyle::LK_JavaScript &&
-        CurrentToken->is(Keywords.kw_import))
+        CurrentToken->is(Keywords.kw_import) && !Style.JavaScriptWrapImports)
       return LT_ImportStatement;
----------------
I think it is a bit dodgy to not mark the line as import statement based on this style option. Would it be a lot of work to pull the decision of whether or not to format this out a level higher?


http://reviews.llvm.org/D21273





More information about the cfe-commits mailing list