All Downloads are FREE. Search and download functionalities are using the official Maven repository.

config.geomajas-checkstyle.xml Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
  ~
  ~ Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
  ~
  ~ The program is available in open source according to the GNU Affero
  ~ General Public License. All contributions in this program are covered
  ~ by the Geomajas Contributors License Agreement. For full licensing
  ~ details, see LICENSE.txt in the project root.
  -->

<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN" "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">

<!--
  Checkstyle is very configurable. Be sure to read the documentation at
  http://checkstyle.sf.net (or in your downloaded distribution).
-->

<module name="Checker">

	<property name="charset" value="UTF-8"/>

	<!-- Checks that a package.html file exists for each package.     -->
	<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
	<!--<module name="PackageHtml"/>-->

	<!-- Checks whether files end with a new line.                        -->
	<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
	<!--
	<module name="NewlineAtEndOfFile">
		<property name="severity" value="info"/>
	</module>
	-->

	<!-- Checks that property files contain the same keys.         -->
	<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
	<!--<module name="Translation"/>-->

	<!-- duplicate code, see http://checkstyle.sourceforge.net/config_duplicates.html -->
	<!-- does not work as this marks the copyright headers as duplicate -->
	<!--<module name="StrictDuplicateCode"/>-->

	<!-- header, see http://checkstyle.sourceforge.net/config_header.html -->

	<module name="Header">
		<!-- The follow property value demonstrates the ability     -->
		<!-- to have access to ANT properties. In this case it uses -->
		<!-- the ${basedir} property to allow Checkstyle to be run  -->
		<!-- from any directory within a project.                   -->
		<!--<property name="headerFile" value="config/equanda-header.txt"/>-->
		<property name="header"
				  value="/*\n * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.\n *\n * Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.\n *\n * The program is available in open source according to the GNU Affero\n * General Public License. All contributions in this program are covered\n * by the Geomajas Contributors License Agreement. For full licensing\n * details, see LICENSE.txt in the project root.\n */\n"/>
	</module>

<!--
	<module name="RegexpHeader">
		<property name="header"
				  value="^/\*$\n^ \* This is part of Geomajas, a GIS framework, http://www\.geomajas\.org/\.$\n^ \*$\n^ \* Copyright 2008-\d\d\d\d Geosparc nv, http://www\.geosparc\.com/, Belgium.$\n^ \*$\n^ \* The program is available in open source according to the GNU Affero$\n^ \* General Public License. All contributions in this program are covered$\n^ \* by the Geomajas Contributors License Agreement\. For full licensing$\n^ \* details, see LICENSE\.txt in the project root\.$\n^ \*/$\n"/>
	</module>
-->

	<!--<module name="FileTabCharacter"/>-->

    <module name="RegexpSingleline">
        <property name="format" value="^\t*    "/>
		<property name="message" value="Indentation should use tabs."/>
    </module>

	<module name="RegexpSingleline">
		<property name="severity" value="info"/>
		<!-- \s matches whitespace character, $ matches end of line. -->
		<property name="format" value="\s+$"/>
		<property name="message" value="Line has trailing spaces."/>
	</module>

	<module name="SuppressionCommentFilter">
		<property name="offCommentFormat" value="CHECKSTYLE VISIBILITY MODIFIER\: OFF"/>
		<property name="onCommentFormat" value="CHECKSTYLE VISIBILITY MODIFIER\: ON"/>
		<property name="checkFormat" value="VisibilityModifierCheck"/>
	</module>

	<module name="SuppressionCommentFilter">
		<property name="offCommentFormat" value="CHECKSTYLE THROWS_THROWABLE\: OFF"/>
		<property name="onCommentFormat" value="CHECKSTYLE THROWS_THROWABLE\: ON"/>
		<property name="checkFormat" value="IllegalThrowsCheck"/>
	</module>

	<module name="SuppressionCommentFilter">
		<property name="offCommentFormat" value="CHECKSTYLE\: OFF"/>
		<property name="onCommentFormat" value="CHECKSTYLE\: ON"/>
		<property name="checkFormat" value=".*"/>
	</module>

	<module name="org.geomajas.checkstyle.TreeWalker">

		<!-- cacheFile should not be used as this breaks the ApiCompatibilityCheck
		<property name="cacheFile" value="${checkstyle.cache.file}"/> -->
		<property name="tabWidth" value="4"/>

		<module name="FileContentsHolder"/>

		<module name="MissingDeprecated"/>

		<!-- Block checks, see http://checkstyle.sourceforge.net/config_blocks.html -->

			<module name="LeftCurly">
				<!--<property name="severity" value="info"/>
				<property name="option" value="nl"/>-->
			</module>
			<module name="RightCurly">
				<!--<property name="severity" value="info"/>-->
				<property name="option" value="same"/>
			</module>

		<!--<module name="EmptyBlock"/>-->
		<module name="AvoidNestedBlocks"/>
		<module name="NeedBraces"/>

		<!-- Javadoc comments checks, see http://checkstyle.sourceforge.net/config_javadoc.html -->

		<module name="JavadocMethod">
			<property name="scope" value="package"/>
			<!-- @todo it would be better to enable this, but the code is not ready for this -->
			<property name="severity" value="info"/>
		</module>
		<module name="JavadocType">
			<property name="authorFormat" value="\S"/>
		</module>
		<module name="JavadocVariable">
			<property name="scope" value="package"/>
			<!-- @todo it would be better to enable this, but the code is not ready for this -->
			<property name="severity" value="info"/>
		</module>
		<module name="JavadocStyle">
			<property name="scope" value="package"/>
			<property name="checkEmptyJavadoc" value="false"/> <!-- true complains on {@inheritDoc} -->
		</module>

		<!-- Naming conventions, see http://checkstyle.sourceforge.net/config_naming.html -->

		<!--<module name="AbstractClassName"/>-->
		<!--<module name="LocalFinalVariableName"/>-->
		<module name="ConstantName">
			<property name="format" value="^(([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
		</module>
		<module name="LocalFinalVariableName"/>
		<module name="LocalVariableName"/>
		<module name="MemberName"/>
		<module name="MethodName"/>
		<module name="PackageName"/>
		<module name="ParameterName"/>
		<module name="StaticVariableName"/>
		<module name="TypeName"/>

		<!-- imports, see http://checkstyle.sourceforge.net/config_imports.html -->

		<module name="AvoidStarImport"/>
		<module name="AvoidStaticImport"/>
		<module name="IllegalImport"/>
		<module name="RedundantImport"/>
		<module name="UnusedImports">
			<!--<property name="severity" value="info"/>-->
		</module>
		<module name="ImportOrder">
			<property name="groups" value="be,org"/>
			<property name="severity" value="info"/>
		</module>
		<!--<module name="ImportControl"/>-->

		<!-- size violations, see http://checkstyle.sourceforge.net/config_sizes.html -->

		<module name="LineLength">
			<property name="max" value="120"/>
		</module>
		<!--
		<module name="FileLength">
			<property name="severity" value="info"/>
		</module>
		<module name="MethodLength">
			<property name="severity" value="info"/>
		</module>
		-->
		<module name="ParameterNumber">
			<property name="severity" value="info"/>
		</module>

		<!-- whitespace, see http://checkstyle.sourceforge.net/config_whitespace.html -->

		<module name="GenericWhitespace"/>
		<module name="EmptyForInitializerPad">
			<property name="option" value="space"/>
		</module>
		<!--
		<module name="EmptyForIteratorPad">
			<property name="option" value="space"/>
		</module>
		-->
		<module name="MethodParamPad"/>
		<module name="NoWhitespaceAfter">
			<!-- Default tokens and additional GENERIC_START -->
			<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, GENERIC_START"/>
		</module>
		<module name="NoWhitespaceBefore">
			<!-- Default tokens and additional GENERIC_START and GENERIC_END -->
			<property name="tokens" value="POST_DEC, POST_INC, GENERIC_START, GENERIC_END"/>
		</module>
		<!--<module name="OperatorWrap"/>-->
		<module name="ParenPad">
			<property name="tokens" value="CTOR_CALL, METHOD_CALL, SUPER_CTOR_CALL"/>
			<property name="option" value="nospace"/>
		</module>
		<module name="TypecastParenPad"/>
		<module name="WhitespaceAfter">
			<!-- Default tokens and additional GENERIC_END -->
			<property name="tokens" value="COMMA, SEMI, TYPECAST, GENERIC_END"/>
		</module>
		<module name="WhitespaceAround">
			<!--<property name="severity" value="info"/>-->
			<!-- Default tokens without GENERIC_START and GENERIC_END -->
			<property name="tokens"
					  value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE"/>
			<property name="allowEmptyConstructors" value="true"/>
			<property name="allowEmptyMethods" value="true"/>
		</module>

		<!-- modifiers, see http://checkstyle.sourceforge.net/config_modifier.html -->

		<module name="ModifierOrder"/>
		<module name="RedundantModifier"/>

		<!-- coding , see http://checkstyle.sourceforge.net/config_coding.html -->

		<module name="ArrayTrailingComma">
			<property name="severity" value="info"/>
		</module>
		<!--<module name="AvoidInlineConditionals"/>-->
		<module name="CovariantEquals"/>
		<module name="DoubleCheckedLocking"/>
		<module name="EmptyStatement">
			<!--<property name="severity" value="info"/>-->
		</module>
		<module name="EqualsAvoidNull">
			<!--<property name="severity" value="info"/>-->
		</module>
		<module name="EqualsHashCode"/>
		<!--<module name="FinalLocalVariable">
			<property name="severity" value="info"/>
		</module>-->
		<module name="HiddenField">
			<property name="severity" value="info"/>
			<property name="ignoreConstructorParameter" value="true"/>
			<property name="ignoreSetter" value="true"/>
		</module>
		<module name="IllegalInstantiation">
			<property name="classes" value="java.lang.Boolean"/>
		</module>
		<!--
		<module name="IllegalToken">
			<property name="tokens" value="LITERAL_NATIVE"/>
		</module>
		-->
		<module name="IllegalTokenText"/>
		<module name="InnerAssignment">
			<!--<property name="severity" value="info"/>-->
		</module>
		<!--<module name="MagicNumber"/>-->
		<module name="MissingSwitchDefault">
			<property name="severity" value="info"/>
		</module>
		<module name="ModifiedControlVariable"/>
		<!--<module name="RedundantThrows"/>-->
		<module name="SimplifyBooleanExpression"/>
		<module name="SimplifyBooleanReturn"/>
		<module name="StringLiteralEquality"/>
		<!--<module name="NestedIfDepth"/>-->
		<!--<module name="NestedTryDepth"/>-->
		<!--<module name="SuperClone"/>-->
		<module name="SuperFinalize"/>
		<!--<module name="IllegalCatch"/>-->
		<module name="IllegalThrows"/>
		<module name="PackageDeclaration"/>
		<module name="JUnitTestCase"/>
		<!--<module name="ReturnCount"/>-->
		<!--<module name="IllegalType"/>-->
		<!--<module name="DeclarationOrder"/>-->
		<module name="ParameterAssignment">
			<property name="severity" value="info"/>
		</module>
		<module name="ExplicitInitialization">
			<!--<property name="severity" value="info"/>-->
		</module>
		<module name="DefaultComesLast"/>
		<!--<module name="MissingCtor"/>-->
		<module name="FallThrough"/>
		<module name="MultipleStringLiterals">
			<property name="severity" value="info"/>
			<property name="ignoreStringsRegexp" value='^(("")|(" ")|(", "))$'/>
		</module>
		<!--<module name="MultipleVariableDeclarations"/>-->
		<!--<module name="RequireThis"/>-->
		<!--<module name="UnnecessaryParentheses"/>-->

		<!-- class design, see http://checkstyle.sourceforge.net/config_design.html -->

		<module name="VisibilityModifier">
			<property name="protectedAllowed" value="true"/>
		</module>
		<module name="FinalClass"/>
		<!--<module name="InterfaceIsType"/>-->
		<module name="HideUtilityClassConstructor"/>
		<!--<module name="DesignForExtension"/>-->
		<!--<module name="MutableException"/>-->
		<!--<module name="ThrowsCount"/>-->

		<!-- misc, see http://checkstyle.sourceforge.net/config_misc.html -->

		<!--<module name="TodoComment"/>-->
		<module name="UncommentedMain">
			<property name="excludedClasses" value="Runner$"/>
		</module>
		<module name="UpperEll"/>
		<module name="ArrayTypeStyle"/>
		<!--<module name="FinalParameters"/>-->
		<!--<module name="DescendantToken"/>-->
		<!--<module name="Indentation"/>-->
		<!--<module name="TrailingComment"/>-->
		<!--<module name="RequiredRegexp"/>-->
		<!--<module name="Regexp"/>-->

		<!-- Verify Geomajas API contract -->
		<module name="org.geomajas.checkstyle.ApiCompatibilityCheck">
			<property name="severity" value="error"/>
			<property name="basedir" value="${basedir}" />
		</module>

	</module>

</module>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy