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

om.liferay.source.formatter.1.0.614.source-code.checkstyle.xml Maven / Gradle / Ivy

<?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">
	<module name="TreeWalker">
		<property name="tabWidth" value="4" />
		<module name="AnnotationUseStyleCheck" />
		<module name="ArrayTypeStyleCheck" />
		<module name="AvoidNestedBlocksCheck" />
		<module name="AvoidStarImportCheck" />
		<module name="DefaultComesLastCheck" />
		<module name="JavadocStyleCheck">
			<property name="checkFirstSentence" value="false" />
		</module>
		<module name="LocalFinalVariableNameCheck">
			<property name="format" value="^[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Local final variable ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="LocalVariableNameCheck">
			<property name="format" value="^[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Local non-final variable ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="MemberNameCheck">
			<property name="applyToPackage" value="false" />
			<property name="applyToPrivate" value="false" />
			<property name="format" value="^[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Protected or public non-static field ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="MemberNameCheck">
			<property name="applyToProtected" value="false" />
			<property name="applyToPublic" value="false" />
			<property name="format" value="^_[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Private non-static field ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="MethodParamPadCheck" />
		<module name="MissingDeprecatedCheck" />
		<module name="ModifierOrderCheck" />
		<module name="MultipleVariableDeclarationsCheck" />
		<module name="NoLineWrapCheck" />
		<module name="NoWhitespaceAfterCheck">
			<property name="tokens" value="ARRAY_DECLARATOR, ARRAY_INIT, BNOT, DEC, DOT, INC, INDEX_OP, LNOT, TYPECAST, UNARY_MINUS, UNARY_PLUS" />
		</module>
		<module name="NoWhitespaceBeforeCheck" />
		<module name="OneStatementPerLineCheck" />
		<module name="OperatorWrapCheck">
			<property name="option" value="eol" />
			<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, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND" />
		</module>
		<module name="PackageNameCheck" />
		<module name="ParameterNameCheck">
			<message key="name.invalidPattern" value="Parameter ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="RequireThisCheck" />
		<module name="StaticVariableNameCheck">
			<property name="applyToPackage" value="false" />
			<property name="applyToPrivate" value="false" />
			<property name="format" value="^[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Protected or public static non-final field ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="StaticVariableNameCheck">
			<property name="applyToProtected" value="false" />
			<property name="applyToPublic" value="false" />
			<property name="format" value="^_[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Private static non-final field ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="StringLiteralEqualityCheck" />
		<module name="TypeNameCheck">
			<property name="format" value="^[A-Z][_a-zA-Z0-9]*" />
			<message key="name.invalidPattern" value="Class, interface, enum or annotation ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="UnnecessaryParenthesesCheck" />
		<module name="WhitespaceAfterCheck">
			<property name="tokens" value="COMMA, SEMI" />
		</module>
		<module name="WhitespaceAroundCheck">
			<property name="allowEmptyTypes" value="true" />
		</module>

		<!-- Custom checks -->

		<module name="com.liferay.source.formatter.checkstyle.checks.AnnotationParameterOrderCheck">
			<message key="annotation.unsortedParameter" value="Annotation parameter ''{0}'' is not sorted alphabetically" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.AppendCheck">
			<message key="end.character.invalid" value="When appending multiple literal strings, only the last literal string can end with ''{0}''" />
			<message key="line.break.incorrect" value="Avoid using line break when appending multiple literal strings" />
			<message key="literal.string.combine" value="Combine the literal strings ''{0}'' and ''{1}''" />
			<message key="literal.string.move" value="Add the string ''{0}'' to the previous literal string" />
			<message key="plus.incorrect" value="Incorrect use of ''+'' inside StringBundler" />
			<message key="start.character.invalid" value="When appending multiple literal strings, only the first literal string can start with ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ArquillianCheck">
			<message key="import.invalid" value="Use import ''com.liferay.arquillian.extension.junit.bridge.junit.Arquillian'' instead of ''org.jboss.arquillian.junit.Arquillian'', see LPS-68945" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.AssertEqualsCheck">
			<message key="assert.add.information" value="Add ''{0}'' as extra parameter at the beginning of the ''Assert.assertEquals'' call to provide more information to the test. See LPS-70411." />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ChainingCheck">
			<property name="allowedClassNames" value=".*[Bb]uilder,Awaitility,EasyMock,Mockito,Optional,Response,RestAssured,Stream,Try" />
			<property name="allowedMethodNames" value="bind" />
			<property name="allowedVariableTypeNames" value="^(?!String).+Builder,Column,CompletableFuture,ContactsEngineClient,Dataset,Description,FormsEventDatasetFilter,.*Function,HttpSecurity,Optional,Response,(Double|Int|Long)?Stream,Try" />
			<message key="chaining.avoid" value="Avoid chaining on method ''{0}''. See https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/documentation/chaining.markdown" />
			<message key="concat.avoid.too.many" value="Use StringBundler instead of chaining concat when there is more than 3 parts" />
			<message key="styling.incorrect" value="Chaining on method ''{0}'' is allowed, but follow the styling described here: https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/documentation/chaining.markdown" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ConcatCheck">
			<message key="end.character.invalid" value="When concatenating multiple literal strings, only the last literal string can end with ''{0}''" />
			<message key="literal.string.combine" value="Combine the literal strings ''{0}'' and ''{1}''" />
			<message key="literal.string.move" value="Add the string ''{0}'' to the previous literal string" />
			<message key="start.character.invalid" value="When concatenating multiple literal strings, only the first literal string can start with ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ConstantNameCheck">
			<property name="camelCaseTypeNames" value="AggregateTestRule,CodeCoverageAssertor,LiferayIntegrationTestRule,Log,Pattern,TestRule" />
			<property name="immutableFieldTypes" value="boolean,byte,char,double,float,int,long,short,Boolean,Byte,Character,Class,Double,Float,Int,Long,Number,Short,String" />
			<message key="name.invalidConstantPattern" value="{0} constant ''{1}'' must match pattern ''{2}''" />
			<message key="name.invalidConstantTypePattern" value="{0} constant ''{1}'' of type ''{2}'' must match pattern ''{3}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ConstructorMissingEmptyLineCheck">
			<message key="empty.line.missing" value="There should be an empty line before line ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.DeprecatedMethodCallsCheck">
			<property name="enabled" value="false" />
			<message key="method.call.deprecated" value="Method ''{0}'' has been deprecated" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.EnumConstantDividerCheck">
			<message key="empty.line.unnecessary" value="Unnecessary empty line needed between enum constants" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.EnumConstantOrderCheck">
			<message key="enum.constant.incorrect.order" value="Enum constant ''{0}'' should come after constant ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.FilterStringWhitespaceCheck">
			<message key="whitespace.incorrect" value="The value of ''{0}'' should not have spaces around ''='', see LPS-70526" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.FullyQualifiedNameCheck">
			<message key="import.statement.use" value="Use import statement instead of Fully Qualified Name for ''{0}'" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.GetterMethodCallCheck">
			<message key="method.call.rename" value="Call ''{0}'' instead of ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.IndentationCheck">
			<message key="indentation.incorrect" value="Line starts with ''{0}'' tabs, but ''{1}'' tabs are expected" />
			<message key="indentation.inside.chain.incorrect" value="Incorrect indentation inside chain. See https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/documentation/chaining.markdown" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.InstanceofOrderCheck">
			<message key="instanceof.order" value="''{0}'' should come before ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.JavadocCheck">
			<message key="javadoc.empty.line" value="First or last line in javadoc should not be empty" />
			<message key="javadoc.incorrect.first.line" value="Javadoc should start with ''/**''" />
			<message key="javadoc.incorrect.last.line" value="Javadoc should end with ''*/''" />
			<message key="javadoc.multiple" value="''{0}'' has multiple javadocs" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.JSONNamingCheck">
			<message key="variable.name.reserved" value="{0} name ending with ''{1}'' is reserved for object ''{2}''" />
			<message key="variable.rename" value="Rename {0} ''{1}'' to ''{2}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.LineBreakAfterCommaCheck">
			<message key="line.break.incorrect" value="There should be a line break after ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.LineEndCharacterCheck">
			<message key="end.line.character.incorrect" value="Line should not end with ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.LocalPatternCheck">
			<message key="pattern.local" value="Create a global variable for Pattern ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.LPS42924Check">
			<message key="lps42924" value="Use ''classNameLocalService.getClassNameId'' instead of ''PortalUtil.getClassName''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MapIterationCheck">
			<message key="entry.set.use" value="Use Map.entrySet() to retrieve values. See https://github.com/liferay/liferay-portal/blob/master/modules/util/source-formatter/documentation/map_iteration.markdown" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MethodNameCheck">
			<property name="applyToPackage" value="false" />
			<property name="applyToPrivate" value="false" />
			<property name="format" value="^[a-z0-9][_a-zA-Z0-9]*$" />
			<message key="name.invalidPattern" value="Protected or public method ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MethodNameCheck">
			<property name="applyToProtected" value="false" />
			<property name="applyToPublic" value="false" />
			<property name="checkDoMethodName" value="true" />
			<property name="format" value="^_[a-z0-9][_a-zA-Z0-9]*$|readObject|writeObject" />
			<message key="method.rename" value="Rename method ''{0}'' to ''{1}''" />
			<message key="name.invalidPattern" value="Private method ''{0}'' must match pattern ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MissingAuthorCheck">
			<message key="author.missing" value="Missing author" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MissingEmptyLineCheck">
			<message key="empty.line.missing.after.variable.reference" value="There should be an empty line before line ''{0}'', as we finished referencing variable ''{1}''" />
			<message key="empty.line.missing.before.variable.use" value="There should be an empty line between assigning and using variable ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MissingModifierCheck">
			<message key="modifier.missing" value="Missing modifier for ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.MissingOverrideCheck">
			<property name="enabled" value="false" />
			<message key="override.missing" value="Missing @Override" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.NotRequireThisCheck">
			<message key="variable.not.require.this" value="Reference to variable ''{0}'' does not need ''.this''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.NumberSuffixCheck">
			<message key="suffix.incorrect" value="Use uppercase ''{0}'' as suffix for the type ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.OperatorOrderCheck">
			<message key="left.argument.literal.or.num" value="''{0}'' should be on the right hand side of the operator" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ParsePrimitiveTypeCheck">
			<message key="getter.util.method.use" value="Use ''GetterUtil.{0}'' or properly catch ''NumberFormatException'' when calling ''{1}.{2}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.PlusStatementCheck">
			<message key="end.character.invalid" value="When concatenating multiple literal strings using '+', only the last literal string can end with ''{0}''" />
			<message key="literal.string.combine" value="Combine the literal strings ''{0}'' and ''{1}''" />
			<message key="literal.string.move" value="Add the string ''{0}'' to the previous literal string" />
			<message key="start.character.invalid" value="When concatenating multiple literal strings using '+', only the first literal string can start with ''{0}''" />
			<message key="tabbing.incorrect" value="Expected indentation is ''{0}'' tabs" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.PersistenceCallCheck">
			<message key="persistence.call.illegal" value="Illegal call to class ''{0}'', see LPS-68923" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.SelfReferenceCheck">
			<message key="self.reference.unneeded" value="Reference to method ''{0}'' does not need ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.SemiColonCheck">
			<message key="semi.colon.unnecessary" value="Unnecessary semi colon" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.SizeIsZeroCheck">
			<message key="method.use" value="Use method ''{0}'' instead" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.StringBundlerNamingCheck">
			<message key="variable.name.incorrect" value="StringBundler {0} ''{1}'' should end with either ''sb'' or ''SB''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.StringCastCheck">
			<message key="string.cast.unneeded" value="No need to call ''.toString()'' on type String" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.SubnameCheck">
			<message key="method.invalidName" value="'sub' should be followed by a lowercase character for method ''{0}''" />
			<message key="parameter.invalidName" value="'sub' should be followed by a lowercase character for parameter ''{0}''" />
			<message key="variable.invalidName" value="'sub' should be followed by a lowercase character for variable ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.TernaryOperatorCheck">
			<message key="ternary.operator.avoid" value="Use if-else-statement instead of ternary conditional operator for better readability" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.TestClassCheck">
			<message key="test.base.class.invalidName" value="Base test class ''{0}'' should start with ''Base''" />
			<message key="test.case.class.incorrect.abstract" value="Class ending in *TestCase should be abstract. Either make the class abstract or rename to ''{0}'' if the class contains actual tests" />
			<message key="test.class.incorrect.abstract" value="Test class ''{0}'' should not be abstract" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.TransactionalTestRuleCheck">
			<message key="import.invalid" value="Avoid using import TransactionalTestRule in *StagedModelDataHandlerTest, see LPS-68908" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.UnprocessedExceptionCheck">
			<message key="exception.unprocessed" value="Unprocessed exception ''{0}'', see LPS-36174" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.UnusedParameterCheck">
			<message key="parameter.unused" value="Parameter ''{0}'' is unused" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.UnusedVariableCheck">
			<message key="variable.unused" value="Variable ''{0}'' is unused" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.UnwrappedVariableInfoCheck">
			<message key="variable.info.unwrapped" value="Wrap the variable ''{0}'' into an inner class ''Concealer'' in order to defer array elements initialization, see LPS-72768" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.ValidatorIsNullCheck">
			<message key="method.invalidName" value="Avoid using method ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.VariableNameCheck">
			<message key="variable.rename" value="Rename variable ''{0}'' to ''{1}''" />
			<message key="variable.typo" value="Typo in variable ''{0}'', expected variable name ''{1}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.WhitespaceAfterParameterAnnotationCheck">
			<message key="whitespace.missing" value="Whitespace is expected after ''{0}''" />
		</module>
		<module name="com.liferay.source.formatter.checkstyle.checks.WhitespaceAroundGenericsCheck">
			<message key="whitespace.missing" value="Whitespace is expected after ''{0}''" />
			<message key="whitespace.redundant" value="Incorrect whitespace before ''{0}''" />
		</module>
	</module>
</module>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy