Bug 1315942 (findbugs-android)

Run code analyzer in automation to avoid common errors (FindBugs, PMD, error-prone)

NEW
Unassigned

Status

()

task
P5
normal
3 years ago
4 months ago

People

(Reporter: sebastian, Unassigned)

Tracking

(Depends on 2 bugs, Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

We recently fixed a crash caused by simply forgetting a "break" in a switch statement. That's something most (static) code analyzers warn about. Right now we do not run such a tool in automation and therefore miss such problems if the reviewer doesn't see it.

There are gradle plugins for findbugs or PMD. Integration should be easy and more or less the same as our "checkstyle" task.

Running findbugs locally reports 650 warnings (77 high priority / 573 medium priority). If we fix the high priority warnings then we could run those checks in automation.
Priority: -- → P3
Duplicate of this bug: 972976
I don't really have a preference for one of the tools. FindBugs seems to be very easy to integrate and widely used.
Depends on: 1315980
Alias: findbugs-android
Depends on: 1315982
Depends on: 1316002
Depends on: 1316004
Depends on: 1316005
Depends on: 1316006
Depends on: 1316008
Depends on: 1316009
Depends on: 1316010
Depends on: 1316011
Depends on: 1316012
Depends on: 1316013
Depends on: 1316015
Depends on: 1316017
Depends on: 1316021
Depends on: 1316023
I filed bugs for all the "high priority" warnings from find bugs. After fixing those bugs we can run those checks in automation. They are all marked as "good first bugs".
Depends on: 1320035
Depends on: 1320078
Depends on: 1320079
Depends on: 1320176
Depends on: 1320298
Depends on: 1320300
Depends on: 1320316
Depends on: 1320992
Oops, wrong bug number in that commit message.
Backout by kwierso@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/563c2a63a5e6
Backed out changeset 6c70f14a433e for landing with the wrong bug number
Depends on: 1358338
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195

Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
Type: defect → task
You need to log in before you can comment on or make changes to this bug.