Chromium Code Reviews
Help | Chromium Project | Sign in
(197)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 2 months ago by M-A Ruel
Modified:
3 years, 10 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
Trybot results:
Commit: CQ not working?

Messages

Total messages: 4 (0 generated)
M-A Ruel
5 years, 2 months ago (2010-01-27 23:01:15 UTC) #1
Nicolas Sylvain
ok
5 years, 2 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?
5 years, 2 months ago (2010-01-27 23:39:07 UTC) #3
M-A Ruel
5 years, 2 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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld cf4c24d