Closed Bug 1315942 (findbugs-android) Opened 8 years ago Closed 3 years ago

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

Categories

(Firefox for Android Graveyard :: General, task, P5)

All
Android

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: sebastian, Unassigned)

References

(Blocks 1 open bug)

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
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
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.