This is the checkstyle file to be used by Java development within Jaguars.
- Start IntelliJ
- From the "Welcome to IntelliJ IDEA" screen click "Configure"
- Click "Settings"
- On the left click "CheckStyle" (if you don't see CheckStyle, you need to first install the CheckStyle plugin for IntelliJ)
- Add a new configuration file.
- Type in a name for the description, e.g. "Sun Checks (Jaguars Version)".
- Check "Use a CheckStyle file accessible via HTTP", and enter the URL:
https://raw.githubusercontent.com/Jaguars/CheckStyle/master/sun_checks.xml - Click "Next"
- Click "Finish"
- Make sure you check the new configuration file as "Active"
- Check "Scan test classes"
After that, all new projects for IntelliJ should use this new coding standard. For existing projects, you may have to follow this guide after opening the project in order to set the project specific settings.
- Open your projects
pom.xmlfile. - Add the following plugin XML to your build section:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.11</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<configLocation>https://raw.githubusercontent.com/Jaguars/CheckStyle/master/sun_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<failsOnError>true</failsOnError>
<failOnViolation>true</failOnViolation>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>