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

Issue 10832062: Add ability to format errors as a list of temp-allow rules to paste (Closed)

Created:
8 years, 4 months ago by Jói
Modified:
8 years, 4 months ago
CC:
chromium-reviews, pam+watch_chromium.org, M-A Ruel
Visibility:
Public.

Description

Add ability to format errors as a list of temp-allow rules to paste into a DEPS file. The idea behind this change is that the tool now lets you do this: a) Update a DEPS file for some directory with the intended rules for the directory, e.g. rules disallowing certain directories (say "chrome/browser") and allowing others (e.g. "chrome/browser/apis"). b) Run this tool on that particular directory to generate a list of temp-allow rules. c) Paste the temp-allow rules into the DEPS file for the directory. d) Work on eliminating dependencies until the temp-allow rules list in the DEPS file reaches zero. To accomplish this change, and fix the bug that existed that the checkdeps tool didn't work correctly if you specified a start directory, I refactored the code to always use the approach I had introduced in CheckAddedCppIncludes, which when you request rules for a given directory generates all parent directories' rules first, up to the base directory. Also, to enable better extraction of error information for the eventual formatter, I externalized formatting to separate classes and had the code collect only the logical error information. While in there, fixed use of quotes to match coding standard. BUG=138280 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149455

Patch Set 1 : . #

Total comments: 26

Patch Set 2 : Address review comments. #

Total comments: 2

Patch Set 3 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+297 lines, -160 lines) Patch
M tools/checkdeps/checkdeps.py View 1 2 12 chunks +114 lines, -101 lines 0 comments Download
M tools/checkdeps/checkdeps_test.py View 3 chunks +14 lines, -1 line 0 comments Download
M tools/checkdeps/cpp_checker.py View 3 chunks +21 lines, -34 lines 0 comments Download
M tools/checkdeps/java_checker.py View 3 chunks +7 lines, -8 lines 0 comments Download
A tools/checkdeps/results.py View 1 1 chunk +119 lines, -0 lines 0 comments Download
M tools/checkdeps/rules.py View 3 chunks +22 lines, -16 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Jói
8 years, 4 months ago (2012-07-31 15:38:28 UTC) #1
erikwright (departed)
I don't have Python readability but I will brush up on the styleguide and do ...
8 years, 4 months ago (2012-07-31 17:22:45 UTC) #2
Jói
Please take another look. On Tue, Jul 31, 2012 at 5:22 PM, <erikwright@chromium.org> wrote: > ...
8 years, 4 months ago (2012-08-01 11:16:32 UTC) #3
erikwright (departed)
LGTM. Skimmed the Python styleguide and it seems justly applied. http://codereview.chromium.org/10832062/diff/7002/tools/checkdeps/checkdeps.py File tools/checkdeps/checkdeps.py (right): http://codereview.chromium.org/10832062/diff/7002/tools/checkdeps/checkdeps.py#newcode364 ...
8 years, 4 months ago (2012-08-01 14:57:04 UTC) #4
Jói
Thanks, will commit. I fixed the last nit (from .. import). There's a bunch of ...
8 years, 4 months ago (2012-08-01 15:22:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/10832062/12001
8 years, 4 months ago (2012-08-01 15:23:19 UTC) #6
commit-bot: I haz the power
8 years, 4 months ago (2012-08-01 19:02:27 UTC) #7
Change committed as 149455

Powered by Google App Engine
This is Rietveld 408576698