Add compile guard presubmit check for ARC compile guards |
||
Issue descriptionSomething like "if a file is created in ios/ or ios_internal and is a .mm, it should have this string"
,
Dec 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0066f73c3e3cba1cd9d57337465d900d34eedb3f commit 0066f73c3e3cba1cd9d57337465d900d34eedb3f Author: stkhapugin@chromium.org <stkhapugin@chromium.org> Date: Thu Dec 28 10:44:32 2017 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} [modify] https://crrev.com/0066f73c3e3cba1cd9d57337465d900d34eedb3f/ios/PRESUBMIT.py [modify] https://crrev.com/0066f73c3e3cba1cd9d57337465d900d34eedb3f/ios/PRESUBMIT_test.py
,
Dec 28 2017
,
Dec 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d7eac5cca81d054abf2ebd76919a4d3fb43e3d94 commit d7eac5cca81d054abf2ebd76919a4d3fb43e3d94 Author: stkhapugin@chromium.org <stkhapugin@chromium.org> Date: Thu Dec 28 17:29:58 2017 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} [modify] https://crrev.com/d7eac5cca81d054abf2ebd76919a4d3fb43e3d94/ios/PRESUBMIT_test.py |
||
►
Sign in to add a comment |
||
Comment 1 by stkhapugin@chromium.org
, Dec 27 2017