Mobile/Fennec/Android/Static analysis: Difference between revisions

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to navigation Jump to search
Line 24: Line 24:
Checks code style
Checks code style
  ./mach gradle app:checkstyle
  ./mach gradle app:checkstyle
 
Or [[Mobile/Fennec/Android/Static_analysis/checkstyle-idea|run it in Intellij/Android Studio]].
* '''example checks?''' [http://checkstyle.sourceforge.net/google_style.html Google's style guide]
* '''example checks?''' [http://checkstyle.sourceforge.net/google_style.html Google's style guide]
* '''in automation?''' Treeherder tier 2 "checkstyle" job
* '''in automation?''' Treeherder tier 2 "checkstyle" job

Revision as of 01:29, 9 April 2016

Android Lint

Catches various errors & optimizations specifically related to Android code and resources

./mach gradle app:lint

Facebook Infer

Currently detects NullPointerExceptions and resource leaks in Android applications.

It's currently unknown how to run locally.

checkstyle

Checks code style

./mach gradle app:checkstyle

Or run it in Intellij/Android Studio.

Coverity

Cloud-based static analysis that catches many miscellaneous Java errors, e.g. null dereference & dead code

https://scan.coverity.com/projects/firefox-mobile

  • example checks? N/A
  • in automation? See above link
  • config? Configured online
  • open issues? See online
  • meta bug? meta bug
  • You must be added as a member of the Coverity project in order to interact with the dashboard – talk to :Sylvestre
  • You can sign up for email notifications (via the online interface) when new Coverity defects are found

eslint

Checks for Javascript errors (e.g. syntax errors, almost like a compiled language! :D)

./mach eslint --setup  # run once, or if the command breaks for some reason
./mach eslint mobile/android