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

Issue 1407033004: Presubmit enforce that DCHECK_IS_ON() does not forget the braces. (Closed)

Created:
5 years, 2 months ago by danakj
Modified:
3 years, 10 months ago
CC:
chromium-reviews, dcheng, piman, Nico
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Presubmit enforce that DCHECK_IS_ON() does not forget the braces. If you forget the braces, then it will just ignore what was inside the #if, which is not what you wanted. Long awaited followup to https://codereview.chromium.org/842523002/ R=phajdan.jr@chromium.org Committed: https://crrev.com/61c1aa285420ab0de1e1b0777ae43f211766a6c5 Cr-Commit-Position: refs/heads/master@{#356099}

Patch Set 1 #

Total comments: 4

Patch Set 2 : presubmit: . #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -1 line) Patch
M PRESUBMIT.py View 1 3 chunks +19 lines, -1 line 3 comments Download

Messages

Total messages: 25 (6 generated)
danakj
5 years, 2 months ago (2015-10-23 20:24:21 UTC) #1
ncarter (slow)
https://codereview.chromium.org/1407033004/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/1407033004/diff/1/PRESUBMIT.py#newcode378 PRESUBMIT.py:378: """Checks to make sure DCHECK_IS_ON() does not skip the ...
5 years, 2 months ago (2015-10-23 20:39:02 UTC) #3
danakj
PTAL https://codereview.chromium.org/1407033004/diff/1/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/1407033004/diff/1/PRESUBMIT.py#newcode378 PRESUBMIT.py:378: """Checks to make sure DCHECK_IS_ON() does not skip ...
5 years, 2 months ago (2015-10-23 21:53:16 UTC) #4
danakj
https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py#newcode388 PRESUBMIT.py:388: ('%s:%d: Use of DCHECK_IS_ON() must be written as "#if ...
5 years, 2 months ago (2015-10-23 21:53:42 UTC) #5
ncarter (slow)
lgtm
5 years, 2 months ago (2015-10-23 22:01:52 UTC) #6
ncarter (slow)
On 2015/10/23 22:01:52, ncarter wrote: > lgtm I should add: while this is not a ...
5 years, 2 months ago (2015-10-23 22:04:19 UTC) #7
Nico
can you check how much this slows down the presubmit step? (it's already way to ...
5 years, 2 months ago (2015-10-23 23:06:53 UTC) #9
danakj
On 2015/10/23 23:06:53, Nico (vacation Fri Oct 23) wrote: > can you check how much ...
5 years, 2 months ago (2015-10-24 00:14:05 UTC) #10
ncarter (slow)
On 2015/10/24 00:14:05, danakj wrote: > On 2015/10/23 23:06:53, Nico (vacation Fri Oct 23) wrote: ...
5 years, 2 months ago (2015-10-24 01:49:40 UTC) #11
ncarter (slow)
On 2015/10/24 01:49:40, ncarter wrote: > On 2015/10/24 00:14:05, danakj wrote: > > On 2015/10/23 ...
5 years, 2 months ago (2015-10-24 06:51:41 UTC) #12
Paweł Hajdan Jr.
LGTM
5 years, 1 month ago (2015-10-26 12:53:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1407033004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1407033004/20001
5 years, 1 month ago (2015-10-26 18:15:06 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/58206)
5 years, 1 month ago (2015-10-26 18:19:46 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1407033004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1407033004/20001
5 years, 1 month ago (2015-10-26 19:51:39 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 1 month ago (2015-10-26 19:55:59 UTC) #20
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/61c1aa285420ab0de1e1b0777ae43f211766a6c5 Cr-Commit-Position: refs/heads/master@{#356099}
5 years, 1 month ago (2015-10-26 19:56:48 UTC) #21
kjellander_chromium
AFAIK braces look like this: {} (a.k.a. curly brackets) and () is always called parentheses. ...
3 years, 10 months ago (2017-02-20 07:09:49 UTC) #23
danakj
https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py File PRESUBMIT.py (right): https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py#newcode389 PRESUBMIT.py:389: 'DCHECK_IS_ON()", not forgetting the braces.') On 2017/02/20 07:09:48, kjellander_chromium ...
3 years, 10 months ago (2017-02-22 00:19:54 UTC) #24
kjellander_chromium
3 years, 10 months ago (2017-02-22 11:08:18 UTC) #25
Message was sent while issue was closed.
On 2017/02/22 00:19:54, danakj wrote:
> https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py
> File PRESUBMIT.py (right):
> 
> https://codereview.chromium.org/1407033004/diff/20001/PRESUBMIT.py#newcode389
> PRESUBMIT.py:389: 'DCHECK_IS_ON()", not forgetting the braces.')
> On 2017/02/20 07:09:48, kjellander_chromium wrote:
> > Shouldn't 'braces' be replaced by 'parentheses' or am I missing something?
> > See http://practicaltypography.com/parentheses-brackets-and-braces.html
> 
> You can submit a CL to fix it if you want :)

Sure: https://codereview.chromium.org/2705303004/

Powered by Google App Engine
This is Rietveld 408576698