0
Commit Graph

5 Commits

Author SHA1 Message Date
Vaclav Brozek
cdc7defb01 Run PRESUBMIT_test.py in subdirectories
Right now, changes to //PRESUBMIT.py trigger running
//PRESUBMIT_test.py during presubmit checks.

However, this does not happen for PRESUBMITs in subdirectories, of
which there is a number with associated PRESUBMIT_test. This CL allows
running the associated PRESUBMIT_test.

Bug: 821981
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I057f4d736992795dde7dd0d329ed3773d22553dc
Reviewed-on: https://chromium-review.googlesource.com/966906
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544318}
2018-03-20 09:54:35 +00:00
Gauthier Ambard
7fc07bf6ad Fix PRESUBMIT check for ARC guard
The check is failing because it was written as if the content of the
file returned with f.NewContents() is a string. It is actually a list.
This CL fixes it.

The check never worked.

Bug: 798289
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Icfd216bbcaee78671878b65ac412b9063bd24509
Reviewed-on: https://chromium-review.googlesource.com/847372
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526452}
2018-01-02 09:58:03 +00:00
stkhapugin@chromium.org
d7eac5cca8 Remove constant duplication in presubmit test.
Makes presubmit test use an existing constant from PRESUBMIT.py.

Bug: 762461
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I4fcfed6430f166390c9aa1fd24109d73e8709cc0
Reviewed-on: https://chromium-review.googlesource.com/845620
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526301}
2017-12-28 17:29:58 +00:00
stkhapugin@chromium.org
0066f73c3e Add a presubmit check for ARC compile guards in new .mm files for iOS.
Implements a new presubmit check that verifies that newly created .mm
files have a proper compile guard.

For example:

$ touch ios/asdf.mm
$ git commit -am "asdf" && git cl upload

Running presubmit upload checks ...

** Presubmit ERRORS **
Found new Objective-C implementation file without compile guard. Please use the following compile guard:
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif

ios/asdf.mm


Bug: 762461
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ice720c8ddf5db2f11b12e56c0877619d612fa9ef
Reviewed-on: https://chromium-review.googlesource.com/844696
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526292}
2017-12-28 10:44:32 +00:00
Sylvain Defresne
fcda19fd7a [ios] Add a PRESUBMIT check for TODO.
All TODOs in src/ios/ should follow the format TODO(crbug.com/######)
so add a PRESUBMIT.py check (and corresponding unit tests) for that.

BUG=677203

Change-Id: I360ad75c786f292d3a8ada8df519cb451c1c2828
Reviewed-on: https://chromium-review.googlesource.com/538613
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482589}
2017-06-27 10:26:23 +00:00