Mobile/Fennec/Android/Static analysis/checkstyle-idea: Difference between revisions
< Mobile | Fennec | Android | Static analysis
Jump to navigation
Jump to search
(Created page with "You can run checkstyle via the [https://plugins.jetbrains.com/plugin/1065 checkstyle-idea plugin] within Android Studio or Intellij. It will highlight violations in red, e.g....") |
|||
| Line 3: | Line 3: | ||
[[File:Checkstyle-idea-example.png|center|Example of checkstyle-idea failure]] | [[File:Checkstyle-idea-example.png|center|Example of checkstyle-idea failure]] | ||
== Installation & | == Installation == | ||
# Open the preferences | |||
# Find "Plugins" in the preferences | |||
# Click "Browse repositories" | |||
# Search for "checkstyle". | |||
# Select CheckStyle-IDEA | |||
# Click "Install plugin" on the right & confirm | |||
# Click restart Android Studio | |||
=== Adding the config file === | |||
# Click the "+" in the Configuration File box | |||
# Open the preferences | |||
# Go to (or search for) "Checkstyle" menu item (it's under "Other Settings") | |||
TODO: can we do this by code? | |||
http://mxr.mozilla.org/mozilla-central/source/mobile/android/app/checkstyle.xml | |||
Revision as of 01:28, 9 April 2016
You can run checkstyle via the checkstyle-idea plugin within Android Studio or Intellij. It will highlight violations in red, e.g. package statements should not span more than one line:
Installation
- Open the preferences
- Find "Plugins" in the preferences
- Click "Browse repositories"
- Search for "checkstyle".
- Select CheckStyle-IDEA
- Click "Install plugin" on the right & confirm
- Click restart Android Studio
Adding the config file
- Click the "+" in the Configuration File box
- Open the preferences
- Go to (or search for) "Checkstyle" menu item (it's under "Other Settings")
TODO: can we do this by code? http://mxr.mozilla.org/mozilla-central/source/mobile/android/app/checkstyle.xml
