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

Issue 406373002: depot_tools: modify cpplint.py to allow CPPLINT.cfg overrides (Closed)

Created:
6 years, 5 months ago by Alex Vakulenko (Google)
Modified:
6 years ago
CC:
chromium-reviews, cmp-cc_chromium.org, Daniel Erat, Dirk Pranke, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Project:
tools
Visibility:
Public.

Description

depot_tools: modify cpplint.py to allow CPPLINT.cfg overrides Added the ability to provide CPPLINT.cfg files to provide linter message filters per sub-directory and special exclusion rules. Each file can have instructions like: filter=-build/include_order,+build/include_alpha exclude_files=.*\.cc The above disables build/include_order warning and enables build/include_alpha as well as excludes all .cc from being processed by linter, in the current directory (where the .cfg file is located) and all sub-directories. Related CL: https://chromium-review.googlesource.com/#/c/209384/ BUG=chromium:395296 TEST=ran cpplint.py on a bunch of directories in platform2/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=285999

Patch Set 1 #

Total comments: 22

Patch Set 2 : Fixed review comments #

Total comments: 2

Patch Set 3 : Fixed last review comment #

Patch Set 4 : Changed the way .cfg files are processed and added "set noparent" option to prevent going to parent… #

Total comments: 2

Patch Set 5 : Addressed comments #

Patch Set 6 : Oops, missed the condition. NOT is important. #

Patch Set 7 : Final revision, simplified code to removed duplicated assignment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -1 line) Patch
M cpplint.py View 1 2 3 4 5 6 10 chunks +142 lines, -1 line 0 comments Download

Messages

Total messages: 23 (1 generated)
Alex Vakulenko (Google)
In order to address https://code.google.com/p/chromium/issues/detail?id=395296 this is an attempt to modify cpplint.py to look for ...
6 years, 5 months ago (2014-07-22 22:53:48 UTC) #1
Alex Vakulenko (Google)
6 years, 5 months ago (2014-07-23 16:20:35 UTC) #2
sosa
https://codereview.chromium.org/406373002/diff/1/cpplint.py File cpplint.py (right): https://codereview.chromium.org/406373002/diff/1/cpplint.py#newcode685 cpplint.py:685: # backup of filter list. Used to restore the ...
6 years, 5 months ago (2014-07-23 17:35:00 UTC) #3
Alex Vakulenko (Google)
Fixed review issues https://codereview.chromium.org/406373002/diff/1/cpplint.py File cpplint.py (right): https://codereview.chromium.org/406373002/diff/1/cpplint.py#newcode685 cpplint.py:685: # backup of filter list. Used ...
6 years, 5 months ago (2014-07-23 19:04:51 UTC) #4
Alex Vakulenko (Google)
Fixed a case where build/include_alpha fails on non-#include line that precedes an #include, like in: ...
6 years, 5 months ago (2014-07-23 20:16:50 UTC) #5
sosa
Technically looks good, but I'm not an owner here so I'm assuming someone from depot_tools ...
6 years, 5 months ago (2014-07-23 20:25:42 UTC) #6
Alex Vakulenko (Google)
Fixed last comment https://codereview.chromium.org/406373002/diff/20001/cpplint.py File cpplint.py (right): https://codereview.chromium.org/406373002/diff/20001/cpplint.py#newcode5488 cpplint.py:5488: """ Looks for CPPLINT.cfg files in ...
6 years, 5 months ago (2014-07-23 20:44:32 UTC) #7
Alex Vakulenko (Google)
Since I'm not sure who would be the best person to review this, I added ...
6 years, 5 months ago (2014-07-24 17:25:51 UTC) #8
iannucci
maruel looks like the likely best reviewer based on blame.
6 years, 5 months ago (2014-07-24 19:17:54 UTC) #9
M-A Ruel
On 2014/07/23 20:25:42, sosa wrote: > Also, it seems like these are changes we need ...
6 years, 5 months ago (2014-07-25 05:35:43 UTC) #10
Alex Vakulenko (Google)
On 2014/07/25 05:35:43, M-A Ruel wrote: > On 2014/07/23 20:25:42, sosa wrote: > > Also, ...
6 years, 5 months ago (2014-07-25 15:01:07 UTC) #11
Elliot Glaysher
(I don't actually know enough python to credibly review this.)
6 years, 5 months ago (2014-07-25 17:29:20 UTC) #12
Elliot Glaysher
On 2014/07/25 05:35:43, M-A Ruel wrote: > On 2014/07/23 20:25:42, sosa wrote: > > Also, ...
6 years, 5 months ago (2014-07-25 22:26:35 UTC) #13
Alex Vakulenko (Google)
> One thing that does jump out (and this should be handled as chrome policy) ...
6 years, 5 months ago (2014-07-25 22:32:43 UTC) #14
Alex Vakulenko (Google)
On 2014/07/25 22:32:43, Alex Vakulenko (Google) wrote: > > One thing that does jump out ...
6 years, 4 months ago (2014-07-28 18:42:29 UTC) #15
M-A Ruel
My observations; - It's not malware. - There's new code is doing things that may ...
6 years, 4 months ago (2014-07-28 19:04:40 UTC) #16
Elliot Glaysher
lgtm I'm not in love with CPPLINT.cfg, but there's precedent with BUILD.gn, PRESUBMIT.py, OWNERS, WATCHLISTS, ...
6 years, 4 months ago (2014-07-28 19:11:16 UTC) #17
sosa
lgtm w/ nits https://codereview.chromium.org/406373002/diff/80001/cpplint.py File cpplint.py (right): https://codereview.chromium.org/406373002/diff/80001/cpplint.py#newcode5508 cpplint.py:5508: break # Reached the root directory. ...
6 years, 4 months ago (2014-07-28 20:28:46 UTC) #18
sosa
lgtm w/ nits
6 years, 4 months ago (2014-07-28 20:28:47 UTC) #19
Alex Vakulenko (Google)
The CQ bit was checked by avakulenko@google.com
6 years, 4 months ago (2014-07-28 22:11:02 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/avakulenko@google.com/406373002/140001
6 years, 4 months ago (2014-07-28 22:11:29 UTC) #21
commit-bot: I haz the power
6 years, 4 months ago (2014-07-28 22:13:35 UTC) #22
Message was sent while issue was closed.
Change committed as 285999

Powered by Google App Engine
This is Rietveld 408576698