Skip to content

Commit

Permalink
Checkstyle integration (tests for copyright header and wrong javadoc …
Browse files Browse the repository at this point in the history
…param references)
  • Loading branch information
aaime committed Feb 17, 2019
1 parent e935570 commit d358ce4
Show file tree
Hide file tree
Showing 167 changed files with 358 additions and 759 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ matrix:
- jdk: oraclejdk11
env: ARGS="-Dfmt.skip=true" COMMUNITY_ARGS=$ARGS
- jdk: oraclejdk11
env: ARGS="-Dfmt.action=check -Ppmd -Perrorprone -Pspotbugs -DskipTests=true" COMMUNITY_ARGS="-Dfmt.action=check -DskipTests=true"
env: ARGS="-Dfmt.action=check -Dqa -DskipTests=true" COMMUNITY_ARGS="-Dfmt.action=check -DskipTests=true"

33 changes: 33 additions & 0 deletions build/qa/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Check Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: gt-checks
Description: none
-->
<module name="Checker">
<property name="severity" value="error"/>
<module name="TreeWalker">
<module name="JavadocMethod">
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="suppressLoadErrors" value="true"/>
</module>
</module>
<module name="RegexpHeader">
<property name="multiLines" value="2,3"/> <!-- Allows to have other copyrights, see line 2 and 3 of the regexp -->
<property name="header" value="^/\* (Copyright\s*)?\(c\) \d{4}(\s*-\s*\d{4})? Open Source Geospatial Foundation - all rights reserved$\n^
\* (Copyright\s*)?\(c\).*$\n^
\*$\n^
\* This code is licensed under the GPL 2.0 license, available at the root$\n^
\* application directory.$\n^
\*"/>
<property name="fileExtensions" value="java"/>
</module>
</module>
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2007 OpenPlans
* This code is licensed under the GPL 2.0 license, availible at the root
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.csw.response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public final class DXFWriterFinder {
* Create a new DXFWriter instance for the requested version (null => any available version)
*
* @param version requested version compatibility
* @param mew writer
*/
public static DXFWriter getWriter(String version, Writer writer) {
FactoryRegistry writerRegistry = getServiceRegistry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
*/
package org.vfny.geoserver.wms.responses.map.htmlimagemap;

/**
* DOCUMENT ME!
*
* @author Mauro Bartolomeoli
*/
/** @author Mauro Bartolomeoli */
public class AbortedException extends Exception {
/** */
private static final long serialVersionUID = 225177065602384118L;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* (c) 2004-2008 Open Source Geospatial Foundation (LGPL)
* (c) 2004-2008 Open Source Geospatial Foundation (LGPL)
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

import org.geoserver.platform.ServiceException;

/**
* DOCUMENT ME!
*
* @author Mauro Bartolomeoli
*/
/** @author Mauro Bartolomeoli */
public class EncoderConfigurationException extends ServiceException {
/** */
private static final long serialVersionUID = -791532675720744977L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ public HTMLImageMapResponse() {
/**
* Writes the generated map to an OutputStream.
*
* @param out final output stream
* @throws ServiceException DOCUMENT ME!
* @throws IOException DOCUMENT ME!
* @param output final output stream
*/
@Override
public void write(Object value, OutputStream output, Operation operation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class HTMLImageMapWriter extends OutputStreamWriter {
* Creates a new HTMLImageMapWriter object.
*
* @param out stream to encode the layer to
* @param config current wms context
* @param mapContent current wms context
* @throws ClassCastException
* @throws UnsupportedEncodingException
*/
Expand Down Expand Up @@ -151,7 +151,7 @@ private void initWriters() {
* Encodes a single layer (FeatureCollection) using the supplied style.
*
* @param fColl layer to encode
* @param style style to use for encoding
* @param ftsList the feature type styles to use for encoding
* @throws IOException if an error occurs during encoding
* @throws AbortedException if the operation is aborted
*/
Expand Down Expand Up @@ -298,7 +298,6 @@ private abstract class HTMLImageMapFeatureWriter {
* encoding
*
* @param ft feature to encode
* @param style style to use for the encoding
* @param fts "cached" ftss matching the FeatureType of the feature
* @throws IOException if an error occurs during encoding
*/
Expand Down Expand Up @@ -358,7 +357,6 @@ protected void commitBuffer() throws IOException {
* d) post geometry encoding e) end feature encoding
*
* @param ft feature to encode
* @param style style to use for the encoding
* @param fts "cached" ftss matching the FeatureType of the feature
* @throws IOException if an error occurs during encoding
*/
Expand Down Expand Up @@ -481,7 +479,6 @@ protected void reset(SimpleFeature ft) {
* Analyze the supplied style and process any matching rule.
*
* @param ft feature to which the style is going to be applied
* @param style style to process
* @param ftsList cached fts matching the feature
* @return true if the supplied feature has to be included in the output according to style
* filters.
Expand Down Expand Up @@ -824,7 +821,6 @@ public GeometryCollectionWriter() {}
* the loop.
*
* @param ft feature to encode
* @param style style to use for the encoding
* @param fts "cached" ftss matching the FeatureType of the feature
* @throws IOException if an error occurs during encoding
*/
Expand Down Expand Up @@ -874,7 +870,6 @@ protected String getShape() throws IOException {
* Analyze the supplied style and process any matching rule.
*
* @param ft feature to which the style is going to be applied
* @param style style to process
* @param ftsList cached fts matching the feature
* @return true if the style filters "accept" the feature
* @throws IOException if an error occurs during the process
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* (c) 2014, 2016 Open Source Geospatial Foundation - all rights reserved
/* (c) 2014 - 2016 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private Attribute getSpatialRefAttribute(CoordinateReferenceSystem crs) {
/**
* Setup a {@link NetCDFUtilities#GEO_TRANSFORM} attribute on top of the MathTransform
*
* @param MathTransform the grid2world geoTransformation
* @param transform the grid2world geoTransformation
* @return the {@link Attribute} containing the GeotTransform attribute
*/
private Attribute getGeoTransformAttribute(MathTransform transform) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ public static class ExtraVariable implements Serializable {
* @param output name of output variable
* @param dimensions whitespace-separated list of output variable dimension names
*/
public ExtraVariable(String source, String target, String dimensions) {
public ExtraVariable(String source, String output, String dimensions) {
this.source = source;
this.output = target;
this.output = output;
this.dimensions = dimensions;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.filter.function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.filter.function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.filter.function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.filter.function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 - 2015 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down Expand Up @@ -342,7 +341,7 @@ private RulesList generateRulesList(String layer, List<Rule> rules) {
}

/**
* @param Rule object
* @param obj Rule object
* @return a string with json rule representation
*/
private JSONObject jsonRule(Object obj) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 - 2015 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 - 2015 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S, http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down Expand Up @@ -297,7 +296,6 @@ private Style remapStyle(
return style;
}

/** @param defaultStyle */
private RasterSymbolizer getRasterSymbolizer(StyleInfo sInfo) {
RasterSymbolizer rasterSymbolizer = null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* Copyright (C) 2007-2008-2009 GeoSolutions S.A.S.
* http://www.geo-solutions.it
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2007-2008-2009 GeoSolutions S.A.S., http://www.geo-solutions.it
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.sldservice.utils.classifier.impl;

import java.awt.Color;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ Map<String, Object> submitChained(ExecuteRequest request, ProgressListener liste
* Process submission, not blocking. Returns an id that can be used to get the process status
* and result later.
*
* @param ExecuteType The request to be executed
* @param inputs The process inputs
* @return The execution id
* @param request The request to be executed
* @return The execution response
* @throws ProcessException
*/
public ExecuteResponseType submit(final ExecuteRequest request, boolean synchronous)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ public GridGeometry invertGridGeometry(Query targetQuery, GridGeometry targetGri
/**
* Store a GridCoverage2D and returns the file where the underlying image have been stored.
*
* @param coverage a {@link GridCoverage2D} wrapping the image to be stored.
* @param tempFolder
* @param image the to be stored.
* @return the {@link File} storing the image.
* @throws IOException
*/
Expand All @@ -382,11 +381,7 @@ private File storeImage(final RenderedImage image, final File tempFolder) throws
* @param targetEnvelope the target envelope
* @param width the final image's width
* @param height the final image's height
* @param targetCrs the target coordinate reference system
* @param order
* @param tempFolder
* @param loggingFolder
* @param timeOut
* @param targetCRS the target coordinate reference system
* @throws IOException
*/
private File warpFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,8 @@ public Point2D mapSourcePoint(Point2D srcPt, int sourceIndex) {
*
* </pre>
*
* @param sourceRect the <code>Rectangle</code> in source coordinates.
* @param sourceIndex the index of the source image.
* @param pxRect the <code>Rectangle</code> in source coordinates.
* @param i the index of the source image.
* @return a <code>Rectangle</code> indicating the destination bounding box, or <code>null
* </code> if the bounding box is unknown.
* @throws IllegalArgumentException if <code>sourceIndex</code> is negative or greater than the
Expand Down

0 comments on commit d358ce4

Please sign in to comment.