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

Issue 257054: Modify gcl lint to pull the IGNORE_PATH from codereview.settings rather than... (Closed)

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

Description

Modify gcl lint to use regexes to figure out which files should be linted. I've added two settings to codereview.settings - LINT_REGEX and LINT_IGNORE_REGEX - to specify which files should be linted. The default is to lint anything that ends in .cpp, .cc, .inl, or .h, and to ignore nothing. I have also modified GetCachedFile() to look for a locally modified version of codereview.settings before looking in the repository. R=maruel@chromium.org TEST=none BUG=none

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 7

Patch Set 4 : updated w/ regexes #

Total comments: 8

Patch Set 5 : use single regexes, make other suggested changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -8 lines) Patch
M gcl.py View 1 2 3 4 4 chunks +26 lines, -8 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Dirk Pranke
I'm finally getting around to fixing the issue raised in http://codereview.chromium.org/192078/show - removing the hardcoded ...
11 years, 2 months ago (2009-10-05 22:09:04 UTC) #1
jam
I haven't touched this code in a while and it's gone through a bunch of ...
11 years, 2 months ago (2009-10-06 05:46:29 UTC) #2
M-A Ruel
http://codereview.chromium.org/257054/diff/4/3001 File gcl.py (right): http://codereview.chromium.org/257054/diff/4/3001#newcode1089 Line 1089: if len([file for suffix in CPP_EXTENSIONS if file.endswith(suffix)]): ...
11 years, 2 months ago (2009-10-06 15:50:08 UTC) #3
Pam (message me for reviews)
I'm not terribly familiar with this section either, so just a few style nits. LGTM ...
11 years, 2 months ago (2009-10-06 15:57:40 UTC) #4
Dirk Pranke
11 years, 1 month ago (2009-10-28 02:51:01 UTC) #5
M-A Ruel
http://codereview.chromium.org/257054/diff/6001/6002 File gcl.py (right): http://codereview.chromium.org/257054/diff/6001/6002#newcode157 Line 157: local_path = url_path.replace(repo_root + "/trunk/src", Ish, I'd rather ...
11 years, 1 month ago (2009-10-28 15:45:23 UTC) #6
Dirk Pranke
11 years, 1 month ago (2009-10-28 21:31:24 UTC) #7
Dirk Pranke
http://codereview.chromium.org/257054/diff/6001/6002 File gcl.py (right): http://codereview.chromium.org/257054/diff/6001/6002#newcode157 Line 157: local_path = url_path.replace(repo_root + "/trunk/src", On 2009/10/28 15:45:23, ...
11 years, 1 month ago (2009-10-29 01:26:29 UTC) #8
Dirk Pranke
11 years, 1 month ago (2009-10-29 02:27:51 UTC) #9
Whoops, I got my reviews crossed and already checked in a version of
this. I'll post an updated one shortly.

Note that since I committed this, the next set of rounds are in a new CL:

http://codereview.chromium.org/340030/show

-- Dirk

On Wed, Oct 28, 2009 at 6:36 PM,  <maruel@chromium.org> wrote:
> On 2009/10/29 01:26:29, dpranke wrote:
>>
>> On 2009/10/28 15:45:23, Marc-Antoine Ruel wrote:
>> > I'm a freak and I love compact code.
>
>> ? I'm not sure what you're saying here. Is there something to change?
>
> I was referring to the fact you added an empty line. :D Don't bother.
>

Gotcha. I think I actually did catch and delete the line.

>
> I'm fine with the regexp part but the cache part seems unrelated and flaky
> to
> me.
>

Without the caching change, it was impossible to test the regexp
change (since it only ever pulls from the repo). More to the point,
it just seems wrong to have no way to test against a local version of
the codereview.settings file, so I added that.

>
> http://codereview.chromium.org/257054/diff/6005/6006
> File gcl.py (right):
>
> http://codereview.chromium.org/257054/diff/6005/6006#newcode156
> Line 156: # First, look for a locally modified version of
> codereview.settings.
> Can you explain what you are trying to do then? Especially that you are
> not 100% sure from which directory you are executing this command.
>

Think I explained it above.

> http://codereview.chromium.org/257054/diff/6005/6006#newcode1084
> Line 1084: IGNORE_PATHS = (os.path.join("webkit","api"),)
> Please remove since it's not necessary to hack that anymore. (And I
> don't think it's referenced anymore)
>

Done.

> http://codereview.chromium.org/257054/diff/6005/6006#newcode1087
> Line 1087: LINT_REGEX = r"(.*\.cpp|.*\.cc|.*\.h)"
> nit: I'd prefer DEFAULT_LINT.* just to be clear it's the default values
> but the variable name starts to be long.
>

Done.

> http://codereview.chromium.org/257054
>

Powered by Google App Engine
This is Rietveld 408576698