Skip to content
Snippets Groups Projects
Commit 40254632 authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Added checkstyle and fixed issues

parent 899ead05
No related branches found
No related tags found
No related merge requests found
...@@ -46,10 +46,12 @@ ...@@ -46,10 +46,12 @@
<property name="allowByTailComment" value="true"/> <property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/> <property name="allowNonPrintableEscapes" value="true"/>
</module> </module>
<!--
<module name="LineLength"> <module name="LineLength">
<property name="max" value="100"/> <property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module> </module>
-->
<module name="AvoidStarImport"/> <module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/> <module name="OneTopLevelClass"/>
<module name="NoLineWrap"/> <module name="NoLineWrap"/>
...@@ -242,10 +244,12 @@ ...@@ -242,10 +244,12 @@
<module name="JavadocMethod"> <module name="JavadocMethod">
<property name="scope" value="public"/> <property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/> <property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/> <property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/> <property name="allowedAnnotations" value="Override, Test"/>
<!-- Not supported anymore
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowThrowsTagsForSubclasses" value="true"/> <property name="allowThrowsTagsForSubclasses" value="true"/>
-->
</module> </module>
<!-- Removed due to instantiation exception <!-- Removed due to instantiation exception
<module name="MissingJavadocMethod"> <module name="MissingJavadocMethod">
......
...@@ -104,6 +104,28 @@ ...@@ -104,6 +104,28 @@
<mainClass>simpleex.ui.FxApp</mainClass> <mainClass>simpleex.ui.FxApp</mainClass>
</configuration> </configuration>
</plugin> </plugin>
<!-- Run the checkstyle code quality tool -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<configLocation>config/checkstyle/google_checks.xml</configLocation>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -80,8 +80,8 @@ public class LatLong { ...@@ -80,8 +80,8 @@ public class LatLong {
/** /**
* Creates a LatLong object from a String, using a specific separator. * Creates a LatLong object from a String, using a specific separator.
* The format is &lt;latitude&gt;&lt;separator&gt;&lt;longitude&gt;. * The format is &lt;latitude&gt;&lt;separator&gt;&lt;longitude&gt;.
* @param s * @param s the string to parse
* @param sep * @param sep the separator to use between latitude, longitude elements
* @return * @return
*/ */
public static LatLong valueOf(final String s, final String sep) { public static LatLong valueOf(final String s, final String sep) {
......
...@@ -9,7 +9,8 @@ public class LatLongs implements Iterable<LatLong> { ...@@ -9,7 +9,8 @@ public class LatLongs implements Iterable<LatLong> {
final List<LatLong> latLongs = new ArrayList<>(); final List<LatLong> latLongs = new ArrayList<>();
public LatLongs() {} public LatLongs() {
}
public LatLongs(final double... latLongsArray) { public LatLongs(final double... latLongsArray) {
addLatLongs(latLongsArray); addLatLongs(latLongsArray);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment