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

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 2 months ago by M-A Ruel
Modified:
2 years, 11 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) Lint Patch
M presubmit_canned_checks.py View 1 chunk +19 lines, -0 lines 0 comments ? errors Download
M tests/presubmit_unittest.py View 2 chunks +61 lines, -0 lines 0 comments ? errors Download
Trybot results:
Commit:

Messages

Total messages: 4
M-A Ruel
4 years, 2 months ago #1
Nicolas Sylvain
ok
4 years, 2 months ago #2
Evan Martin
Will this work for the many files in third_party that have different licensing headers?
4 years, 2 months ago #3
M-A Ruel
4 years, 2 months ago #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 1280:2d3e6564b7b6