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

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

Go to download

A simple utility to manage environment configs in Java-based projects by merging *.properties files with environment variables overrides.

There is a newer version: 1.1.1
Show newest version
<?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">
	<!-- If you set the basedir property below, then all reported file names
		will be relative to the specified directory. See http://checkstyle.sourceforge.net/5.x/config.html#Checker
		<property name="basedir" value="${basedir}"/> -->

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

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

	<!-- Ignore checkstyle for a particular line of code -->
	<!-- See http://checkstyle.sf.net/config_filters.html#SuppressWithNearbyCommentFilter -->
	<module name="SuppressWithNearbyCommentFilter">
		<property name="commentFormat" value="SUPPRESS CHECKSTYLE" />
		<property name="checkFormat" value=".*" />
		<property name="influenceFormat" value="0" />
	</module>

	<!-- Checks for Size Violations. -->
	<!-- See http://checkstyle.sf.net/config_sizes.html -->
	<module name="FileLength" />

	<!-- Checks for whitespace -->
	<!-- See http://checkstyle.sf.net/config_whitespace.html -->
	<!-- <module name="FileTabCharacter">
		<property name="eachLine" value="true"/>
	</module> -->

	<!-- Miscellaneous other checks. -->
	<!-- See http://checkstyle.sf.net/config_misc.html -->
	<module name="RegexpSingleline">
		<property name="format" value="\s+$" />
		<property name="minimum" value="0" />
		<property name="maximum" value="0" />
		<property name="message" value="Line has trailing spaces." />
	</module>

	<!-- Checks for Headers -->
	<!-- See http://checkstyle.sf.net/config_header.html -->
	<!-- <module name="Header"> -->
	<!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
	<!-- <property name="fileExtensions" value="java"/> -->
	<!-- </module> -->

	<module name="TreeWalker">

		<module name="FileContentsHolder" />

		<!-- Checks for Javadoc comments. -->
		<!-- See http://checkstyle.sf.net/config_javadoc.html -->
		<module name="JavadocStyle" />

		<!-- Checks for Naming Conventions. -->
		<!-- See http://checkstyle.sf.net/config_naming.html -->
		<module name="ConstantName">
			<property name="format" value="^log(ger)?|[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
		</module>
		<module name="LocalFinalVariableName" />
		<module name="LocalVariableName" />
		<module name="MemberName" />
		<module name="MethodName">
			<property name="format" value="^[a-z][a-zA-Z0-9_]*$"/>
		</module>
		<module name="PackageName" />
		<module name="ParameterName" />
		<module name="StaticVariableName">
			<property name="format" value="^[a-z][a-zA-Z0-9_]*$|[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$"/>
		</module>
		<module name="TypeName" />

		<!-- Checks for imports -->
		<!-- See http://checkstyle.sf.net/config_import.html -->
		<module name="AvoidStarImport" />
		<module name="IllegalImport" /> <!-- defaults to sun.* packages -->
		<module name="RedundantImport" />
		<module name="UnusedImports">
			<property name="processJavadoc" value="false" />
		</module>

		<!-- Checks for Size Violations. -->
		<!-- See http://checkstyle.sf.net/config_sizes.html -->
		<module name="MethodLength" />
		<module name="ParameterNumber" />

		<!-- Checks for whitespace -->
		<!-- See http://checkstyle.sf.net/config_whitespace.html -->
		<module name="EmptyForIteratorPad" />
		<module name="GenericWhitespace" />
		<module name="MethodParamPad" />
		<module name="NoWhitespaceAfter" />
		<module name="NoWhitespaceBefore" />
		<module name="OperatorWrap" />
		<module name="ParenPad" />
		<module name="TypecastParenPad" />
		<module name="WhitespaceAfter" />
		<module name="WhitespaceAround">
            <property name="tokens" value="RCURLY"/>
        </module>

		<!-- Modifier Checks -->
		<!-- See http://checkstyle.sf.net/config_modifiers.html -->
		<module name="ModifierOrder" />
		<module name="RedundantModifier" />

		<!-- Checks for blocks. You know, those {}'s -->
		<!-- See http://checkstyle.sf.net/config_blocks.html -->
		<module name="AvoidNestedBlocks" />
		<module name="EmptyBlock" />
		<module name="LeftCurly" />
		<module name="NeedBraces" />
		<module name="RightCurly" />

		<!-- Checks for common coding problems -->
		<!-- See http://checkstyle.sf.net/config_coding.html -->
		<module name="EmptyStatement" />
		<module name="EqualsHashCode" />

		<!-- Hiding a field is not a real problem in modern IDEs since the
         members of a class are highlighted and there are sometimes reasons
         for naming a local variable like a field it corresponds to.
	    <module name="HiddenField">
	      <property name="tokens" value="VARIABLE_DEF" />
	      <property name="ignoreConstructorParameter" value="true" />
	      <property name="ignoreSetter" value="true" />
	    </module>
	    -->

		<module name="IllegalInstantiation" />
		<module name="InnerAssignment" />
		<!-- <module name="MagicNumber" /> -->
		<module name="MissingSwitchDefault" />
		<module name="SimplifyBooleanExpression" />
		<module name="SimplifyBooleanReturn" />

		<!-- Checks for class design -->
		<!-- See http://checkstyle.sf.net/config_design.html -->
		<module name="FinalClass" />
		<module name="VisibilityModifier">
		    <property name="protectedAllowed" value="true"/>
		    <property name="packageAllowed" value="true"/>
		</module>

		<!-- Miscellaneous other checks. -->
		<!-- See http://checkstyle.sf.net/config_misc.html -->
		<module name="ArrayTypeStyle" />
		<!-- <module name="TodoComment" /> -->
		<module name="UpperEll" />

	</module>

	<!-- Disabled modules within Checker module -->
	<!--<module name="JavadocPackage"/> -->


	<!-- Disabled modules within TreeWalker module -->
	<!--<module name="JavadocMethod"/> -->
	<!--<module name="JavadocType"/> -->
	<!--<module name="JavadocVariable"/> -->
	<!--<module name="LineLength"/> -->
	<!--<module name="DesignForExtension"/> -->
	<!--<module name="HideUtilityClassConstructor"/> -->
	<!--<module name="FinalParameters"/> -->
	<!--<module name="AvoidInlineConditionals"/> -->

</module>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy