📅 2015-Feb-19 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ checkstyle, eclipse, plugin ⬩ 📚 Archive
CheckStyle is a popular Java tool to ensure that source code adheres to a coding standard and is useful to enforcing style in a team or company. It is available for Eclipse as the Elipse CheckStyle plugin. CheckStyle is packaged along with this plugin and does not need to be separately installed.
Install: To install CheckStyle in Eclipse, go to Help -> Install New Software and add the URL http://eclipse-cs.sf.net/update to add the plugin.
CheckStyle comes pre-installed with the style of Google and other configuration files. You can view these listed in Window -> Preferences -> CheckStyle.
Add style: You can also add your own style configuration files by choosing New -> External Configuration File in the CheckStyle preferences dialog.
To set the styles to be applied on a project, right-click on it and choose Properties -> Checkstyle and choose the style you want from the dropdown.
Activate style: Activating CheckStyle for a project makes it check the project source files whenever they are saved. To do this, right-click on the project and choose CheckStyle -> Activate Checkstyle.
To manually check the style, right-click on the project and choose Properties -> Check Code with Checkstyle.
Tried with: CheckStyle 6.2, Eclipse 4.4.1 (Luna) and Ubuntu 14.04