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

From MozillaWiki
< Mobile‎ | Fennec‎ | Android
Jump to navigation Jump to search
Line 33: Line 33:


== eslint ==
== eslint ==
Checks for Javascript errors (e.g. syntax errors, almost like a compiled language! :D)
./mach eslint <path>
* '''example checks?''' http://eslint.org/docs/rules/
* '''in automation?''' Treeherder tier 1 "ES" job
* '''config?''' [http://mxr.mozilla.org/mozilla-central/find?string=.eslint&tree=mozilla-central&hint=mobile%2F mobile/*.eslintrc] & [http://mxr.mozilla.org/mozilla-central/source/.eslintignore root .eslintignore]
* '''open issues?''' Open a .eslintrc and enable checks.
* '''meta bug?''' [https://bugzilla.mozilla.org/show_bug.cgi?id=939329 meta bug]
* If you fix all issues for a warning, modify the appropriate .eslintrc to change your warning into an error!

Revision as of 18:03, 25 March 2016

Android Lint

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

./mach gradle app:lint

Notes:

Facebook Infer

Currently detects NullPointerExceptions and resource leaks in Android applications.

It's currently unknown how to run locally.

Notes:

checkstyle

Checks code style

./mach gradle app:checkstyle

eslint

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

./mach eslint <path>