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

Issue 141493002: Add a canned clang-format presubmit check (Closed)

Created:
6 years, 11 months ago by enne (OOO)
Modified:
6 years, 11 months ago
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org, ncarter (slow), Nico
Visibility:
Public.

Description

Add a canned clang-format presubmit check For simplicity, the canned presubmit check just calls git cl format directly with a new option --dry-run which does not change the files on disk. Because some users may not have git or clang-format might somehow have errors, this canned check is a warning. Additionally, if git cl format fails with an error then the presubmit check will silently report success to avoid spamming misconfigured users during upload. BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=246066

Patch Set 1 #

Total comments: 5

Patch Set 2 : Address nick's review #

Patch Set 3 : AppEngine nonsense #

Total comments: 4

Patch Set 4 : Use subprocess2.VOID #

Patch Set 5 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -7 lines) Patch
M git_cl.py View 1 2 3 4 4 chunks +21 lines, -7 lines 0 comments Download
M presubmit_canned_checks.py View 1 1 chunk +12 lines, -0 lines 0 comments Download
M tests/presubmit_unittest.py View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
enne (OOO)
PTAL https://codereview.chromium.org/141493002/diff/1/tests/presubmit_unittest.py File tests/presubmit_unittest.py (right): https://codereview.chromium.org/141493002/diff/1/tests/presubmit_unittest.py#newcode1755 tests/presubmit_unittest.py:1755: 'CheckPatchFormatted', As per discussion offline with iannucci who ...
6 years, 11 months ago (2014-01-17 02:35:05 UTC) #1
ncarter (slow)
https://codereview.chromium.org/141493002/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/141493002/diff/1/git_cl.py#newcode90 git_cl.py:90: stderr = open("/dev/null", "w") "/dev/null" -> os.devnull This is ...
6 years, 11 months ago (2014-01-17 07:07:08 UTC) #2
enne (OOO)
https://codereview.chromium.org/141493002/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/141493002/diff/1/git_cl.py#newcode90 git_cl.py:90: stderr = open("/dev/null", "w") On 2014/01/17 07:07:08, ncarter wrote: ...
6 years, 11 months ago (2014-01-17 19:24:41 UTC) #3
iannucci
https://codereview.chromium.org/141493002/diff/90001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/141493002/diff/90001/git_cl.py#newcode96 git_cl.py:96: stderr=stderr) I think that subprocess2.VOID is the correct way ...
6 years, 11 months ago (2014-01-17 20:28:50 UTC) #4
enne (OOO)
https://codereview.chromium.org/141493002/diff/90001/git_cl.py File git_cl.py (right): https://codereview.chromium.org/141493002/diff/90001/git_cl.py#newcode96 git_cl.py:96: stderr=stderr) On 2014/01/17 20:28:50, iannucci wrote: > I think ...
6 years, 11 months ago (2014-01-17 21:26:12 UTC) #5
iannucci
On 2014/01/17 21:26:12, enne wrote: > https://codereview.chromium.org/141493002/diff/90001/git_cl.py > File git_cl.py (right): > > https://codereview.chromium.org/141493002/diff/90001/git_cl.py#newcode96 > ...
6 years, 11 months ago (2014-01-17 23:16:47 UTC) #6
iannucci
(oh lgtm, too)
6 years, 11 months ago (2014-01-17 23:17:13 UTC) #7
ncarter (slow)
lgtm
6 years, 11 months ago (2014-01-18 00:56:41 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/141493002/160001
6 years, 11 months ago (2014-01-21 17:37:12 UTC) #9
commit-bot: I haz the power
Failed to apply patch for depot_tools/git_cl.py: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 11 months ago (2014-01-21 17:37:27 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/enne@chromium.org/141493002/220001
6 years, 11 months ago (2014-01-21 17:43:10 UTC) #11
commit-bot: I haz the power
6 years, 11 months ago (2014-01-21 17:44:48 UTC) #12
Message was sent while issue was closed.
Change committed as 246066

Powered by Google App Engine
This is Rietveld 408576698