Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Issue 7050020: Teach sort-headers.py about windows.h. (Closed)

Created:
9 years, 7 months ago by Nico
Modified:
9 years, 7 months ago
Reviewers:
Evan Martin
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

Teach sort-headers.py about windows.h. See http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/a3480ba1e7b8b9c0# BUG=none TEST=Run sort-headers.py on a file that includes <windows.h>, e.g. base/file_util_unittest.cc. That line should stay at the top of its block. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=85957

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M tools/sort-headers.py View 1 chunk +6 lines, -1 line 2 comments Download

Messages

Total messages: 3 (0 generated)
Nico
9 years, 7 months ago (2011-05-19 19:57:53 UTC) #1
Evan Martin
LGTM either way http://codereview.chromium.org/7050020/diff/1/tools/sort-headers.py File tools/sort-headers.py (right): http://codereview.chromium.org/7050020/diff/1/tools/sort-headers.py#newcode41 tools/sort-headers.py:41: if line.find('<windows.h>') != -1: Maybe test ...
9 years, 7 months ago (2011-05-19 20:04:33 UTC) #2
Nico
9 years, 7 months ago (2011-05-19 20:06:21 UTC) #3
http://codereview.chromium.org/7050020/diff/1/tools/sort-headers.py
File tools/sort-headers.py (right):

http://codereview.chromium.org/7050020/diff/1/tools/sort-headers.py#newcode41
tools/sort-headers.py:41: if line.find('<windows.h>') != -1:
On 2011/05/19 20:04:33, Evan Martin wrote:
> Maybe test .startswith() instead?  (will catch the possibly nonexistent corner
> case of 
>   #include "foo.h"  // blah blah <windows.h>

Done. (lstrip().startswith() if someone accidentally two spaces)

Powered by Google App Engine
This is Rietveld 408576698