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

Issue 72273003: [Android] Upstream android lint script and run it on debug builders. (Closed)

Created:
7 years, 1 month ago by frankf
Modified:
7 years ago
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org
Visibility:
Public.

Description

[Android] Upstream android lint script and run it on debug builders. Lint has been super useful downstream, especially when catching API-level issues. Since lint expects a canonical android project, we run it for ChromiumTestShell but add all java directories in src/ and classes/ dirs in out. I've disabled some less useful rules globally to avoid spam. BUG=None

Patch Set 1 : #

Total comments: 8

Patch Set 2 : newt's comments #

Total comments: 5

Patch Set 3 : yfriedman's comments #

Patch Set 4 : Add PrintingControllerImpl.class to suppressions #

Patch Set 5 : rebase #

Total comments: 1

Patch Set 6 : Move std_host_tests to clank builder #

Unified diffs Side-by-side diffs Delta from patch set Stats (+358 lines, -7 lines) Patch
M build/android/buildbot/bb_host_steps.py View 3 chunks +10 lines, -1 line 0 comments Download
M build/android/buildbot/bb_run_bot.py View 1 2 3 4 5 3 chunks +7 lines, -6 lines 0 comments Download
A build/android/lint.py View 1 2 3 4 1 chunk +224 lines, -0 lines 0 comments Download
A build/android/lint_suppressions.xml View 1 2 3 4 1 chunk +117 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
frankf
There has been some refactoring as well, so take a look at everything. yfriedman -> ...
7 years, 1 month ago (2013-11-14 22:10:29 UTC) #1
newt (away)
Thanks, Frank! A couple comments on warnings that I think should or should not be ...
7 years, 1 month ago (2013-11-14 23:39:46 UTC) #2
newt (away)
updated some comments after looking through the full lint output. https://codereview.chromium.org/72273003/diff/70001/build/android/lint_suppressions.xml File build/android/lint_suppressions.xml (right): https://codereview.chromium.org/72273003/diff/70001/build/android/lint_suppressions.xml#newcode94 ...
7 years, 1 month ago (2013-11-15 17:59:24 UTC) #3
frankf
ptal https://codereview.chromium.org/72273003/diff/70001/build/android/lint_suppressions.xml File build/android/lint_suppressions.xml (right): https://codereview.chromium.org/72273003/diff/70001/build/android/lint_suppressions.xml#newcode73 build/android/lint_suppressions.xml:73: <issue id="OldTargetApi"> No need for this to be ...
7 years, 1 month ago (2013-11-15 20:33:29 UTC) #4
Yaron
https://codereview.chromium.org/72273003/diff/270001/build/android/lint.py File build/android/lint.py (right): https://codereview.chromium.org/72273003/diff/270001/build/android/lint.py#newcode168 build/android/lint.py:168: project_path: Absoluate path to the project dir containing the ...
7 years, 1 month ago (2013-11-15 23:23:47 UTC) #5
Yaron
Also, I assume this is pretty fast? Just want to make sure it's going to ...
7 years, 1 month ago (2013-11-15 23:24:15 UTC) #6
Yaron
On 2013/11/15 23:24:15, Yaron wrote: > Also, I assume this is pretty fast? Just want ...
7 years, 1 month ago (2013-11-15 23:27:15 UTC) #7
newt (away)
it runs in about 10 seconds :)
7 years, 1 month ago (2013-11-15 23:33:57 UTC) #8
Yaron
On 2013/11/15 23:33:57, newt wrote: > it runs in about 10 seconds :) Nope: 1mins, ...
7 years, 1 month ago (2013-11-15 23:35:58 UTC) #9
Yaron
On 2013/11/15 23:35:58, Yaron wrote: > On 2013/11/15 23:33:57, newt wrote: > > it runs ...
7 years, 1 month ago (2013-11-15 23:38:24 UTC) #10
frankf
@navabi: This adds ~2 minutes to debug builders. https://codereview.chromium.org/72273003/diff/270001/build/android/lint.py File build/android/lint.py (right): https://codereview.chromium.org/72273003/diff/270001/build/android/lint.py#newcode168 build/android/lint.py:168: project_path: ...
7 years, 1 month ago (2013-11-15 23:51:05 UTC) #11
newt (away)
whoops, yea, I was referring to downstream running time... which isn't at all what you ...
7 years, 1 month ago (2013-11-16 00:01:42 UTC) #12
navabi
On 2013/11/15 23:51:05, frankf wrote: > @navabi: This adds ~2 minutes to debug builders. The ...
7 years, 1 month ago (2013-11-16 03:51:46 UTC) #13
frankf
On 2013/11/16 03:51:46, navabi wrote: > On 2013/11/15 23:51:05, frankf wrote: > > @navabi: This ...
7 years, 1 month ago (2013-11-18 19:00:22 UTC) #14
Isaac (away)
Hi Frank, I agree that lint is no different from findbugs and check_webview_licenses in this ...
7 years, 1 month ago (2013-11-18 20:50:22 UTC) #15
frankf
On 2013/11/18 20:50:22, Isaac wrote: > Hi Frank, > > I agree that lint is ...
7 years, 1 month ago (2013-11-18 21:06:16 UTC) #16
navabi
Thanks Isaac for the input. While I also think Frank's point about not wanting to ...
7 years, 1 month ago (2013-11-18 21:30:29 UTC) #17
newt (away)
Since speed is a concern, I think it'd be worth blacklisting third party code. guava ...
7 years, 1 month ago (2013-11-18 21:43:42 UTC) #18
navabi
On 2013/11/18 21:43:42, newt wrote: > Since speed is a concern, I think it'd be ...
7 years, 1 month ago (2013-11-18 21:53:23 UTC) #19
newt (away)
On 2013/11/18 21:53:23, navabi wrote: > On 2013/11/18 21:43:42, newt wrote: > > Since speed ...
7 years, 1 month ago (2013-11-18 22:00:46 UTC) #20
navabi
On 2013/11/18 22:00:46, newt wrote: > On 2013/11/18 21:53:23, navabi wrote: > > On 2013/11/18 ...
7 years, 1 month ago (2013-11-18 22:06:46 UTC) #21
Isaac (away)
7 years, 1 month ago (2013-11-18 22:56:08 UTC) #22
On 2013/11/18 22:06:46, navabi wrote:
> On 2013/11/18 22:00:46, newt wrote:
> > On 2013/11/18 21:53:23, navabi wrote:
> > > On 2013/11/18 21:43:42, newt wrote:
> > > > Since speed is a concern, I think it'd be worth blacklisting third party
> > code.
> > > > guava and cacheinvalidation in particular are quite large.
> > > > 
> > > >
https://codereview.chromium.org/72273003/diff/430001/build/android/lint.py
> > > > File build/android/lint.py (right):
> > > > 
> > > >
> > >
> >
>
https://codereview.chromium.org/72273003/diff/430001/build/android/lint.py#ne...
> > > > build/android/lint.py:26: 'gen/eyesfree_java',
> > > > we could expand this list a lot:
> > > > 
> > > > ./gen/android_support_v7_appcompat_javalib/classes
> > > > ./gen/android_support_v7_mediarouter_javalib/classes
> > > > ./gen/cacheinvalidation_javalib/classes
> > > > ./gen/cacheinvalidation_proto_java/classes
> > > > ./gen/eyesfree_java/classes
> > > > ./gen/findbugs_plugin_test/classes
> > > > ./gen/guava_javalib/classes
> > > > ./gen/jsr_305_javalib/classes
> > > > ./gen/protobuf_lite_javalib/classes
> > > 
> > > Thanks Newton. How much time would this shave off? This could be a good
> > solution
> > > for now: blacklist third party code to bring the lint test time down, and
> put
> > it
> > > on the android builder.
> > 
> > I'd estimate cutting the time in half, based on the sizes of the .class
files.
> 
> Let's do that. Then you can just add it to android builder.
> 
> I'll monitor these graphs:
>
http://chrome-monitor.appspot.com/view_graph/tryserver.chromium%2520Builder%2...
> to see if we notice any change in the number of pending jobs after this lands.

My preference is to put this on the clang bot initially to see how effective it
is and its speed in practice.  We can figure out pretty quickly how good it
would be at blocking builds before they hit the android testers and it will be
less impactful to developers.

Powered by Google App Engine
This is Rietveld 408576698