Java
The entire Java source code of the Kaa project must conform to the Google Java Style.
This guide describes some tools which can be used to ensure proper style and format of the Java source code.
IntelliJ IDEA plugin
Checkstyle plugin installation:
- Go to File>Settings>IDE Settings>plugins.
- Click Browse repositories.
- Type Checkstyle-idea and install the plugin.
- Go to File>Settings>IDE Settings>CheckStyle.
- Add the configuration file (
checkstyle.xml
) from the root of the Kaa project.
Plugin configuration:
- Go to Analyze>Inspect code.
- Create a new profile with the checkstyle inspector.
Plugin usage:
- Go to Analyze>Inspect code.
- Select the inspection scope and the inspection profile.
Eclipse plugin
Follow tutorial to install the checkstyle plugin.
Maven plugin
The check style maven plugin is used to continuously verify the style of the Java code. By default, it is already configured to use the Google coding conventions. The configuration is located in the root of the Kaa project (checkstyle.xml
).
Automatic code formatter
To automate formatting of the Java code, it is recommended that you use IntelliJ IDEA with appropriate code style settings. To install the code style settings:
-
Click File > Settings > Editor > Code Style.
-
Click Manage and import the
checkstyle.xml
configuration file from the Kaa project root directory.