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

Issue 558007: Add presubmit_canned_checks.CheckLicense() (Closed)

Created:
10 years, 11 months ago by M-A Ruel
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add presubmit_canned_checks.CheckLicense() It does a regexp search on the file contents to make sure it contains expected license boiler plate. It is a generalization to implement the equivalent of ubuntu's license check script into the corresponding PRESUBMIT.py files. TEST=unit tests BUG=28291

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -0 lines) Patch
M presubmit_canned_checks.py View 1 chunk +19 lines, -0 lines 0 comments Download
M tests/presubmit_unittest.py View 2 chunks +61 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
M-A Ruel
10 years, 11 months ago (2010-01-27 23:01:15 UTC) #1
Nicolas Sylvain
ok
10 years, 11 months ago (2010-01-27 23:06:34 UTC) #2
Evan Martin
Will this work for the many files in third_party that have different licensing headers?
10 years, 11 months ago (2010-01-27 23:39:07 UTC) #3
M-A Ruel
10 years, 11 months ago (2010-01-27 23:48:25 UTC) #4
On 2010/01/27 23:39:07, Evan Martin wrote:
> Will this work for the many files in third_party that have different licensing
> headers?

The CheckLicense function uses AffectedSourceFiles() that does a filtering on
the files. See DEFAULT_WHITE_LIST and DEFAULT_BLACK_LIST in
http://src.chromium.org/viewvc/chrome/trunk/tools/depot_tools/presubmit_suppo...

Everything with "third_party" in its name will be skipped automatically due to
DEFAULT_BLACK_LIST. Isn't it magical? :)

Obviously, this can be overridden.

Powered by Google App Engine
This is Rietveld 408576698