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

Issue 11441035: PRESUBMIT #include check enhancements. (Closed)

Created:
8 years ago by marja
Modified:
8 years ago
Reviewers:
M-A Ruel
CC:
chromium-reviews
Visibility:
Public.

Description

PRESUBMIT #include check enhancements. 1) Handle #define and #undef the same way as #if etc. See e.g., https://codereview.chromium.org/11363222/diff/10015/chrome/browser/history/history_unittest.cc line 545. 2) Also headers can have the special first include, not only sources. See e.g., net/disk_cache/storage_block-inl.h. NOTRY=true BUG=NONE Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171511

Patch Set 1 #

Total comments: 2

Patch Set 2 : Code review (maruel) #

Total comments: 8

Patch Set 3 : Code review & test #

Patch Set 4 : code review (maruel) #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -38 lines) Patch
M PRESUBMIT.py View 1 2 3 4 3 chunks +26 lines, -29 lines 0 comments Download
M PRESUBMIT_test.py View 1 2 3 4 8 chunks +38 lines, -9 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
marja
ptal. The diff is wonky, it didn't really diff nicely because there was one part ...
8 years ago (2012-12-06 14:32:46 UTC) #1
M-A Ruel
https://codereview.chromium.org/11441035/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/1/PRESUBMIT.py#newcode617 PRESUBMIT.py:617: warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums)) Do you really want to run ...
8 years ago (2012-12-06 15:16:31 UTC) #2
marja
thanks for comments! https://codereview.chromium.org/11441035/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/1/PRESUBMIT.py#newcode617 PRESUBMIT.py:617: warnings.extend(_CheckIncludeOrderInFile(input_api, f, changed_linenums)) On 2012/12/06 15:16:32, ...
8 years ago (2012-12-06 15:23:08 UTC) #3
M-A Ruel
https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py#newcode598 PRESUBMIT.py:598: changed_linenums)) Note that you are never doing anything with ...
8 years ago (2012-12-06 15:29:27 UTC) #4
marja
Thanks for comments again. I also added a test. https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py#newcode598 PRESUBMIT.py:598: ...
8 years ago (2012-12-06 16:02:52 UTC) #5
M-A Ruel
https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py#newcode617 PRESUBMIT.py:617: changed_linenums = set([line_num for line_num, _ in f.ChangedContents()]) On ...
8 years ago (2012-12-06 16:11:26 UTC) #6
marja
https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/11441035/diff/5001/PRESUBMIT.py#newcode617 PRESUBMIT.py:617: changed_linenums = set([line_num for line_num, _ in f.ChangedContents()]) On ...
8 years ago (2012-12-06 16:15:15 UTC) #7
M-A Ruel
lgtm
8 years ago (2012-12-06 16:16:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/11441035/9001
8 years ago (2012-12-06 16:18:20 UTC) #9
commit-bot: I haz the power
Failed to apply patch for PRESUBMIT_test.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years ago (2012-12-06 16:18:27 UTC) #10
marja
(rebased; somebody else was already mocking the output api...)
8 years ago (2012-12-06 16:35:37 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/11441035/14001
8 years ago (2012-12-06 16:36:34 UTC) #12
commit-bot: I haz the power
8 years ago (2012-12-06 16:38:45 UTC) #13
Message was sent while issue was closed.
Change committed as 171511

Powered by Google App Engine
This is Rietveld 408576698