Closed Bug 716748 Opened 13 years ago Closed 9 years ago

Investigate Google's Android Lint tool for scanning project resources for potential bugs

Categories

(Firefox for Android Graveyard :: General, defect, P4)

ARM
Android
defect

Tracking

(fennec+)

RESOLVED DUPLICATE of bug 1170283
Tracking Status
fennec + ---

People

(Reporter: cpeterson, Unassigned, Mentored)

References

Details

(Whiteboard: [lang=java])

Attachments

(1 file, 1 obsolete file)

Android Lint is an SDK tool which scans Android project sources for potential bugs. It is available both as a command line tool, as well as integrated with Eclipse. Here are some examples of the types of errors that it looks for:

* Missing translations (and unused translations)
* Layout performance problems (all the issues the old layoutopt tool used to find, and more)
* Unused resources
* Inconsistent array sizes (when arrays are defined in multiple configurations)
* Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
* Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
* Usability problems (like not specifying an input type on a text field)
* Manifest errors

Fennec does not have a typical Android project structure, but I think we can lint the generated files in OBJDIR/dist/fennec or OBJDIR/mobile/android.

http://tools.android.com/tips/lint
Assignee: nobody → cpeterson
tracking-fennec: --- → +
Priority: -- → P4
Assignee: cpeterson → nobody
Assignee: nobody → cpeterson
Assignee: cpeterson → nobody
Attached file Lint log (obsolete) —
Running lint on inbound, I get 226 errors and 627 warnings. See attached log.
Can you filter the "Call requires API level X (current min is Y)" errors? Calling APIs above our minimum API level is a feature, not a bug. :)
(In reply to Chris Peterson (:cpeterson) from comment #2)
> Can you filter the "Call requires API level X (current min is Y)" errors?
> Calling APIs above our minimum API level is a feature, not a bug. :)

Yeah, though I think the proper way to get rid of these is to annotate code with @TargetApi: http://developer.android.com/reference/android/annotation/TargetApi.html.

Calling lint with --disable NewApi hides most of the errors; log attached.
Attachment #705648 - Attachment is obsolete: true
Depends on: 834082
Depends on: 837864
Whiteboard: [mentor=mcomella][lang=java]
Noting that any implementation here will likely get wrapped with the work in bug 939350, which is a python lint API that will potentially be integrated with mach and/or hg.
Mentor: michael.l.comella
Whiteboard: [mentor=mcomella][lang=java] → [lang=java]
Note that this is easy to do ad hoc in Eclipse.
Mentor: chriskitching, nalexander
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: