Skip to content

Commit

Permalink
Merge pull request #20 from ppalaga/150603-varia
Browse files Browse the repository at this point in the history
Upgrade to checkstyle 6.7 and minor changes
  • Loading branch information
tsegismont committed Jun 8, 2015
2 parents d4f381c + fd4814f commit 50c0e95
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 78 deletions.
70 changes: 7 additions & 63 deletions build-tools/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
Expand All @@ -17,77 +18,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.hawkular</groupId>
<artifactId>hawkular-build-tools</artifactId>
<version>11-SNAPSHOT</version>

<!-- Link to parent removed as a workaround for http://jira.codehaus.org/browse/MCHECKSTYLE-250
<parent>
<groupId>org.hawkular</groupId>
<artifactId>hawkular-build-tools-parent</artifactId>
<version>7-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
<version>11-SNAPSHOT</version>
</parent>
-->

<artifactId>hawkular-build-tools</artifactId>

<name>Hawkular Build Tools</name>
<description>Contains the Checkstyle configuration for Hawkular projects</description>
<url>https://github.com/hawkular/hawkular-build-tools</url>
<organization>
<name>Red Hat, Inc.</name>
<url>http://redhat.com/</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>

<developers>
<developer>
<id>ppalaga</id>
<name>Peter Palaga</name>
<timezone>Europe/Prague</timezone>
</developer>
</developers>

<mailingLists>
<mailingList>
<name>Hawkular Developer List</name>
<subscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</subscribe>
<unsubscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</unsubscribe>
<archive>http://lists.jboss.org/pipermail/hawkular-dev</archive>
</mailingList>
</mailingLists>

<scm>
<connection>scm:git:git://github.com/hawkular/hawkular-build-tools.git</connection>
<developerConnection>scm:git:ssh://git@github.com/hawkular/hawkular-build-tools.git</developerConnection>
<url>https://github.com/hawkular/hawkular-build-tools</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<url>https://issues.jboss.org/browse/HAWKULAR</url>
<system>jira</system>
</issueManagement>
<distributionManagement>
<repository>
<id>jboss-releases-repository</id>
<name>JBoss Releases Repository</name>
<url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

<properties>

<version.com.puppycrawl.tools.checkstyle>6.1.1</version.com.puppycrawl.tools.checkstyle>
<version.com.puppycrawl.tools.checkstyle>6.7</version.com.puppycrawl.tools.checkstyle>
<version.junit>4.12</version.junit>
</properties>

Expand All @@ -107,4 +50,5 @@
</dependency>

</dependencies>
</project>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.List;

import javax.xml.parsers.ParserConfigurationException;
Expand All @@ -35,7 +37,6 @@
import org.xml.sax.helpers.DefaultHandler;

import com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck;
import com.puppycrawl.tools.checkstyle.api.FastStack;

/**
* @author <a href="mailto:ppalaga@redhat.com">Peter Palaga</a>
Expand Down Expand Up @@ -109,7 +110,7 @@ private class IndentHandler extends DefaultHandler {

private Locator locator;

private FastStack<ElementEntry> stack = FastStack.newInstance();
private Deque<ElementEntry> stack = new ArrayDeque<XmlIndentCheck.ElementEntry>();

/**
* Stores the passed characters into {@link #charBuffer}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<module name="LeftCurly">
<property name="option" value="eol" />
<property name="tokens"
value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,LITERAL_SWITCH,STATIC_INIT,INSTANCE_INIT" />
value="CLASS_DEF,CTOR_DEF,INTERFACE_DEF,METHOD_DEF,LITERAL_SWITCH,STATIC_INIT" />
</module>

<!-- Checks for common coding problems -->
Expand All @@ -76,10 +76,6 @@
<module name="EmptyStatement" />
<module name="EqualsHashCode" />
<module name="IllegalInstantiation" />
<module name="RedundantThrows">
<property name="allowUnchecked" value="true" />
<property name="suppressLoadErrors" value="true" />
</module>

<!-- Miscellaneous other checks. -->
<module name="UpperEll" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.io.LineNumberReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.util.Collections;
import java.util.Locale;
Expand All @@ -47,7 +48,7 @@
*/
public class XmlIndentCheckTest {
protected static class SilentLogger extends DefaultLogger {
public SilentLogger(OutputStream out) {
public SilentLogger(OutputStream out) throws UnsupportedEncodingException {
super(out, true);
}

Expand Down
11 changes: 4 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
</mailingList>
</mailingLists>

<modules>
<module>build-tools</module>
</modules>

<scm>
<connection>scm:git:git://github.com/hawkular/hawkular-build-tools.git</connection>
<developerConnection>scm:git:ssh://git@github.com/hawkular/hawkular-build-tools.git</developerConnection>
Expand All @@ -81,7 +85,6 @@
</snapshotRepository>
</distributionManagement>


<properties>

<!-- Maven general -->
Expand Down Expand Up @@ -111,10 +114,6 @@

</properties>

<modules>
<module>build-tools</module>
</modules>

<build>
<pluginManagement>
<plugins>
Expand All @@ -133,7 +132,6 @@

</plugins>
</pluginManagement>

<plugins>

<plugin>
Expand All @@ -158,7 +156,6 @@
</plugin>

</plugins>

</build>

</project>

0 comments on commit 50c0e95

Please sign in to comment.