clang-format: [JS] Sort all JavaScript imports if any changed.
authorMartin Probst <martin@probst.io>
Fri, 2 Sep 2016 14:01:17 +0000 (14:01 +0000)
committerMartin Probst <martin@probst.io>
Fri, 2 Sep 2016 14:01:17 +0000 (14:01 +0000)
commitb480ffbcef2e0833b471d304861e20c2d6d9e963
tree706f188e9e0fef68aad2ecdcbd5cf05f8250257b
parent7a78e5113a2334dbadd45f0c800312402d737b8b
clang-format: [JS] Sort all JavaScript imports if any changed.

Summary:
User feedback is that they expect *all* imports to be sorted if any import was
affected by a change, not just imports up to the first non-affected line, as
clang-format currently does.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: https://reviews.llvm.org/D23972

llvm-svn: 280485
clang/lib/Format/SortJavaScriptImports.cpp
clang/unittests/Format/SortImportsTestJS.cpp