Skip to content
Snippets Groups Projects
ruleset.xml 4.03 KiB
Newer Older
Roman Ondráček's avatar
Roman Ondráček committed
<?xml version="1.0"?>
Karel Hanák's avatar
Karel Hanák committed
<!--
Karel Hanák's avatar
Karel Hanák committed
Copyright 2017-2023 IQRF Tech s.r.o.
Copyright 2019-2023 MICRORISC s.r.o.
Karel Hanák's avatar
Karel Hanák committed

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software,
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied
See the License for the specific language governing permissions and
limitations under the License.
-->
Roman Ondráček's avatar
Roman Ondráček committed
<ruleset name="IQRF">
	<!-- Ninjify Coding Standard -->
	<rule ref="./vendor/ninjify/coding-standard/ruleset.xml"/>

	<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman">
		<exclude name="Generic.Functions.OpeningFunctionBraceBsdAllman.BraceOnSameLine"/>
	</rule>
	<rule ref="Generic.WhiteSpace.ScopeIndent">
		<properties>
			<property name="indent" value="4"/>
			<property name="tabIndent" value="true"/>
		</properties>
	</rule>
	<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>

	<rule ref="PEAR.Classes.ClassDeclaration">
		<exclude name="PEAR.Classes.ClassDeclaration.OpenBraceNewLine"/>
	</rule>

	<rule ref="SlevomatCodingStandard.Commenting">
		<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDescriptionAndAnnotations"/>
		<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment"/>
		<exclude name="SlevomatCodingStandard.Commenting.RequireOneLineDocComment.MultiLineDocComment" />
Roman Ondráček's avatar
Roman Ondráček committed
	</rule>
	<rule ref="SlevomatCodingStandard.ControlStructures">
		<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountBeforeControlStructure"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.ControlStructureSpacing.IncorrectLinesCountAfterControlStructure"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.EarlyExitNotUsed"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator.MultiLineTernaryOperatorNotUsed"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator.TernaryOperatorNotUsed"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison.RequiredYodaComparison"/>
		<exclude name="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing.IncorrectLinesCountAfterControlStructure" />
		<exclude name="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing.IncorrectLinesCountBeforeControlStructure" />
		<exclude name="SlevomatCodingStandard.ControlStructures.RequireSingleLineCondition.RequiredSingleLineCondition" />
Roman Ondráček's avatar
Roman Ondráček committed
	<rule ref="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators">
		<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostDecrementOperator"/>
	</rule>
	<rule ref="SlevomatCodingStandard.TypeHints">
		<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectWhitespaceBeforeDeclare"/>
Roman Ondráček's avatar
Roman Ondráček committed
		<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes.IncorrectWhitespaceBetweenOpenTagAndDeclare"/>
		<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint"/>
		<exclude name="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
Roman Ondráček's avatar
Roman Ondráček committed
	</rule>
	<rule ref="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators">
		<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPreIncrementOperator" />
		<exclude name="SlevomatCodingStandard.Operators.DisallowIncrementAndDecrementOperators.DisallowedPostIncrementOperator" />
	</rule>
Roman Ondráček's avatar
Roman Ondráček committed
	<rule ref="Squiz.Functions.MultiLineFunctionDeclaration">
		<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine"/>
	</rule>

	<rule ref="Squiz.Arrays.ArrayDeclaration">
		<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNoNewline"/>
	</rule>

Roman Ondráček's avatar
Roman Ondráček committed
	<!--Exclude folders -->
	<exclude-pattern>./tests/temp</exclude-pattern>
</ruleset>