Skip to content

Commit

Permalink
Add checkstyle config for brace style
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed Jun 8, 2017
1 parent b638318 commit 3118e6a
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cache/src/main/java/net/runelite/cache/ItemManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public void java(File java) throws IOException
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"))
Expand Down
3 changes: 2 additions & 1 deletion cache/src/main/java/net/runelite/cache/NpcManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public void java(File java) throws IOException
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"))
Expand Down
3 changes: 2 additions & 1 deletion cache/src/main/java/net/runelite/cache/ObjectManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ public void java(File java) throws IOException
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"))
Expand Down
13 changes: 13 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -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>
13 changes: 13 additions & 0 deletions model-viewer-rsmv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
3 changes: 2 additions & 1 deletion runelite-api/src/main/java/net/runelite/api/ItemID.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion runelite-api/src/main/java/net/runelite/api/NpcID.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion runelite-api/src/main/java/net/runelite/api/ObjectID.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
7 changes: 7 additions & 0 deletions suppressions.xml
Original file line number Diff line number Diff line change
@@ -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>
1 change: 1 addition & 0 deletions travis/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 3118e6a

Please sign in to comment.