Gerrit license check hook for AOSP should allow leading space in C-style comments |
||||||
Issue description
The current license check hook in the aosp tree requires the following regex:
^[#/\*]*
[#/\*]* ?Copyright( \([cC]\))? 20[-0-9]{2,7} The Android Open Source Project
[#/\*]* ?
[#/\*]* ?Licensed under the Apache License, Version 2.0 \(the
... skipped ...
[#/\*]*$
This prevents the following license headers from being accepted (note leading spaces starting from the 2nd line):
/*
* Copyright (c) 2016 The Android Open Source Project
*
... skipped ...
*/
while this one is accepted:
/*
* Copyright (c) 2016 The Android Open Source Project
*
... skipped ...
*/
The regex should allow for a leading space/spaces.
,
May 20 2016
@deymo, sure :) what's the overall approach to regex'es in repohooks/pre-upload.py? I mean how permissive can/should they be? To illustrate: I'm just inclined to simplify and do "[ #/\*]*" or even "[\s#/\*]* instead of "[#/\*]* ?" at the beg of each line. Though, just narrowly addressing my complaint above would be " *[#/\*]* ?".
,
May 21 2016
,
May 24 2016
,
Jun 27 2016
,
Jun 27 2016
,
Aug 3 2016
,
Apr 5 2017
CL was abandoned. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by de...@chromium.org
, May 20 2016