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

Issue 119365: Add InputApi.AffectedSourceFile() and custom filtering support. (Closed)

Created:
11 years, 6 months ago by M-A Ruel
Modified:
9 years, 7 months ago
Reviewers:
Jói Sigurðsson
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add InputApi.AffectedSourceFile() and custom filtering support. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17975

Patch Set 1 #

Patch Set 2 : Add default params #

Patch Set 3 : made it simpler #

Patch Set 4 : More tests #

Patch Set 5 : fix regexp #

Patch Set 6 : Standardize to regexps #

Patch Set 7 : comment #

Total comments: 2

Patch Set 8 : comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -62 lines) Patch
M presubmit_canned_checks.py View 1 2 3 4 5 6 7 5 chunks +23 lines, -15 lines 0 comments Download
M presubmit_support.py View 1 2 3 4 5 3 chunks +62 lines, -4 lines 0 comments Download
M tests/presubmit_unittest.py View 1 2 3 4 5 6 8 chunks +105 lines, -43 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
M-A Ruel
Ok I think I'm there now. It supports on a per call black/white list override ...
11 years, 6 months ago (2009-06-09 19:44:00 UTC) #1
Jói Sigurðsson
LGTM with nits http://codereview.chromium.org/119365/diff/1011/1012 File presubmit_canned_checks.py (right): http://codereview.chromium.org/119365/diff/1011/1012#newcode71 Line 71: text files to be submitted. ...
11 years, 6 months ago (2009-06-09 20:28:53 UTC) #2
M-A Ruel
11 years, 6 months ago (2009-06-09 20:35:22 UTC) #3
On 2009/06/09 20:28:53, Jói wrote:
> http://codereview.chromium.org/119365/diff/1011/1013
> File presubmit_support.py (right):
> 
> http://codereview.chromium.org/119365/diff/1011/1013#newcode142
> Line 142: DEFAULT_WHITE_LIST = [
> Prepend the name with _ (this and the next constant list) to make it clear
> they're private (see http://www.corp.google.com/eng/doc/pyguide.xml#Naming)

I disagree. The use case in chromium would be:

black_list = input_api.DEFAULT_BLACK_LIST + [r".*\bskia[\\\/].*", ...]
f = lambda x: input_api.FilterSourceFile(x, black_list=black_list)
CheckChangeHasNoCR(input_api, output_api, f)

Powered by Google App Engine
This is Rietveld 408576698