Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Issue 595213004: Add PRESUBMIT check for #ifdefs on values that are always defined. (Closed)

Created:
6 years, 2 months ago by lliabraa
Modified:
6 years, 2 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Add PRESUBMIT check for #ifdefs on values that are always defined. Several values are always defined and the developer actually wants to do an #if check, not #ifdef. BUG=417804 Committed: https://crrev.com/35bab3936e07c5bb45a6d6e7000fe4bbca1959fa Cr-Commit-Position: refs/heads/master@{#297627}

Patch Set 1 #

Patch Set 2 : rename variable #

Patch Set 3 : renamed variable #

Patch Set 4 : remove debug logging #

Total comments: 6

Patch Set 5 : moved to single regex, expanded list of macros, fix error message #

Total comments: 4

Patch Set 6 : fix indentation issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -0 lines) Patch
M PRESUBMIT.py View 1 2 3 4 5 2 chunks +50 lines, -0 lines 0 comments Download
M PRESUBMIT_test.py View 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (3 generated)
lliabraa
@stuartmorgan - can you think of any other macro like this? the simulator one is ...
6 years, 2 months ago (2014-09-25 20:06:13 UTC) #2
lliabraa
fyi - added bug number to CL description
6 years, 2 months ago (2014-09-25 20:07:11 UTC) #3
stuartmorgan
https://codereview.chromium.org/595213004/diff/60001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/595213004/diff/60001/PRESUBMIT.py#newcode1401 PRESUBMIT.py:1401: "TARGET_IPHONE_SIMULATOR", From TargetConditionals.h, I'd suggest we also add TARGET_OS_MAC, ...
6 years, 2 months ago (2014-09-25 23:42:32 UTC) #4
lliabraa
Thanks for the review. PTAL! https://codereview.chromium.org/595213004/diff/60001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/595213004/diff/60001/PRESUBMIT.py#newcode1401 PRESUBMIT.py:1401: "TARGET_IPHONE_SIMULATOR", On 2014/09/25 23:42:32, ...
6 years, 2 months ago (2014-09-26 18:22:43 UTC) #5
stuartmorgan
lgtm https://codereview.chromium.org/595213004/diff/80001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/595213004/diff/80001/PRESUBMIT.py#newcode1419 PRESUBMIT.py:1419: for match in ifdef_macro.finditer(line): Fix indentation https://codereview.chromium.org/595213004/diff/80001/PRESUBMIT.py#newcode1426 PRESUBMIT.py:1426: ...
6 years, 2 months ago (2014-09-29 18:51:52 UTC) #6
lliabraa
Thanks Stuart. +phajdan.jr@ for OWNERS https://codereview.chromium.org/595213004/diff/80001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/595213004/diff/80001/PRESUBMIT.py#newcode1419 PRESUBMIT.py:1419: for match in ifdef_macro.finditer(line): ...
6 years, 2 months ago (2014-09-30 11:23:14 UTC) #8
Paweł Hajdan Jr.
LGTM
6 years, 2 months ago (2014-10-01 11:38:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/595213004/100001
6 years, 2 months ago (2014-10-01 11:41:55 UTC) #11
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 5e4b32e8771506a1a27b6e30b404edcf473efc89
6 years, 2 months ago (2014-10-01 12:16:52 UTC) #12
commit-bot: I haz the power
6 years, 2 months ago (2014-10-01 12:17:31 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/35bab3936e07c5bb45a6d6e7000fe4bbca1959fa
Cr-Commit-Position: refs/heads/master@{#297627}

Powered by Google App Engine
This is Rietveld 408576698