diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 21:24:40 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-13 21:24:40 +0000 |
commit | 2661bb90599eba0ce18c85d95a37d05f44d8864f (patch) | |
tree | f1816d58671e18c2f836fac303deaad055877289 | |
parent | 978021055c6a00fcf0bdb327767ebd74e60778b9 (diff) | |
download | chromium_src-2661bb90599eba0ce18c85d95a37d05f44d8864f.zip chromium_src-2661bb90599eba0ce18c85d95a37d05f44d8864f.tar.gz chromium_src-2661bb90599eba0ce18c85d95a37d05f44d8864f.tar.bz2 |
Sort project headers in a case-sensitive way since PRESUBMIT enforces that
The PRESUBMIT check requires that the lines:
#include "third_party/WebKit/...h"
#include "third_party/skia/...h"
be sorted in that order, which requires doing a case-sensitive sort. sort-headers.py was
changed to do a case-insensitive sort in r139294 to avoid shuffling system header includes
like these:
#include <uxtheme.h>
#include <Vssym32.h>
This preserves that behavior only for system-style includes (those with <>).
Review URL: https://codereview.chromium.org/12719005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187945 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | tools/sort-headers.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/sort-headers.py b/tools/sort-headers.py index b1575b3..ac20ca1 100755 --- a/tools/sort-headers.py +++ b/tools/sort-headers.py @@ -37,7 +37,6 @@ def IncludeCompareKey(line): """Sorting comparator key used for comparing two #include lines. Returns the filename without the #include/#import prefix. """ - line = line.lower() for prefix in ('#include ', '#import '): if line.startswith(prefix): line = line[len(prefix):] @@ -56,9 +55,9 @@ def IncludeCompareKey(line): # C++ system headers should come after C system headers. if line.startswith('<'): if line.find('.h>') != -1: - return '2' + line + return '2' + line.lower() else: - return '3' + line + return '3' + line.lower() return '4' + line |