Add checkstyle config for brace style

This commit is contained in:
Adam
2017-06-08 11:58:58 -04:00
parent b638318349
commit 3118e6a799
11 changed files with 65 additions and 6 deletions

View File

@@ -89,7 +89,8 @@ public class ItemManager
fw.println("/* This file is automatically generated. Do not edit. */");
fw.println("package net.runelite.api;");
fw.println("");
fw.println("public final class ItemID {");
fw.println("public final class ItemID");
fw.println("{");
for (ItemDefinition def : items)
{
if (def.name.equalsIgnoreCase("NULL"))

View File

@@ -84,7 +84,8 @@ public class NpcManager
fw.println("/* This file is automatically generated. Do not edit. */");
fw.println("package net.runelite.api;");
fw.println("");
fw.println("public final class NpcID {");
fw.println("public final class NpcID");
fw.println("{");
for (NpcDefinition def : npcs)
{
if (def.name.equalsIgnoreCase("NULL"))

View File

@@ -89,7 +89,8 @@ public class ObjectManager
fw.println("/* This file is automatically generated. Do not edit. */");
fw.println("package net.runelite.api;");
fw.println("");
fw.println("public final class ObjectID {");
fw.println("public final class ObjectID");
fw.println("{");
for (ObjectDefinition def : objects)
{
if (def.getName().equalsIgnoreCase("NULL"))

13
checkstyle.xml Normal file
View File

@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<module name="TreeWalker">
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
</module>
<module name="SuppressionFilter">
<property name="file" value="suppressions.xml"/>
</module>
</module>

View File

@@ -40,4 +40,17 @@
<groupId>net.runelite</groupId>
<artifactId>modelviewer-rsmv</artifactId>
<name>Model Viewer (RSMV)</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<!-- always skip checkstyle despite profile overriden checkstyle.skip property -->
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>

19
pom.xml
View File

@@ -39,6 +39,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<maven.javadoc.skip>true</maven.javadoc.skip>
<checkstyle.skip>true</checkstyle.skip>
<rs.version>144</rs.version>
</properties>
@@ -110,6 +111,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<executions>
<execution>
<id>verify-style</id>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<!-- exclude generated sources from checkstyle https://stackoverflow.com/a/30406454/7189686 -->
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
</configuration>
</plugin>
</plugins>
<extensions>
<extension>

View File

@@ -1,7 +1,8 @@
/* This file is automatically generated. Do not edit. */
package net.runelite.api;
public final class ItemID {
public final class ItemID
{
public static final int DWARF_REMAINS = 0;
public static final int TOOLKIT = 1;
public static final int CANNONBALL = 2;

View File

@@ -1,7 +1,8 @@
/* This file is automatically generated. Do not edit. */
package net.runelite.api;
public final class NpcID {
public final class NpcID
{
public static final int TOOL_LEPRECHAUN = 0;
public static final int MOLANISK = 1;
public static final int ABERRANT_SPECTRE = 2;

View File

@@ -1,7 +1,8 @@
/* This file is automatically generated. Do not edit. */
package net.runelite.api;
public final class ObjectID {
public final class ObjectID
{
public static final int CRATE = 1;
public static final int CAVE_ENTRANCE = 2;
public static final int DOOR = 3;

7
suppressions.xml Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress files="RuntimeTypeAdapterFactory\.java" checks="[a-zA-Z0-9]*"/>
</suppressions>

View File

@@ -264,6 +264,7 @@ under the License.
<properties>
<runelite.tomcat.url>http://api.runelite.net/manager/text</runelite.tomcat.url>
<maven.javadoc.skip>false</maven.javadoc.skip>
<checkstyle.skip>false</checkstyle.skip>
</properties>
</profile>
</profiles>