127 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			XML
		
	
	
			
		
		
	
	
			127 lines
		
	
	
		
			8.2 KiB
		
	
	
	
		
			XML
		
	
	
<?xml version="1.0" encoding="UTF-8"?>
 | 
						|
<ruleset name="drupal_core">
 | 
						|
  <description>Default PHP CodeSniffer configuration for Drupal core.</description>
 | 
						|
  <file>.</file>
 | 
						|
  <arg name="extensions" value="inc,install,module,php,profile,test,theme"/>
 | 
						|
 | 
						|
  <!--Exclude third party code.-->
 | 
						|
  <exclude-pattern>./assets/vendor/*</exclude-pattern>
 | 
						|
 | 
						|
  <!--Exclude test files that are intentionally empty, or intentionally violate coding standards.-->
 | 
						|
  <exclude-pattern>./modules/system/tests/fixtures/HtaccessTest</exclude-pattern>
 | 
						|
 | 
						|
  <!-- Only include specific sniffs that pass. This ensures that, if new sniffs are added, HEAD does not fail.-->
 | 
						|
  <!-- Drupal sniffs -->
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Classes/ClassCreateInstanceSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Classes/ClassDeclarationSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Classes/FullyQualifiedNamespaceSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Classes/UnusedUseStatementSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/CSS/ClassDefinitionNameSpacingSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/CSS/ColourDefinitionSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/ClassCommentSniff.php">
 | 
						|
    <exclude name="Drupal.Commenting.ClassComment.Missing"/>
 | 
						|
  </rule>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/DocCommentSniff.php">
 | 
						|
    <!-- Sniff for these errors: SpacingAfterTagGroup, WrongEnd, SpacingBetween,
 | 
						|
      ContentAfterOpen, SpacingBeforeShort, TagValueIndent, ShortStartSpace,
 | 
						|
      SpacingAfter -->
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.LongNotCapital"/>
 | 
						|
    <!-- ParamNotFirst still not decided for PHPUnit-based tests.
 | 
						|
      @see https://www.drupal.org/node/2253915 -->
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.ParamNotFirst"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.SpacingBeforeTags"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.LongFullStop"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.ShortNotCapital"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.ShortFullStop"/>
 | 
						|
    <!-- TagsNotGrouped and ParamGroup have false-positives.
 | 
						|
      @see https://www.drupal.org/node/2060925 -->
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.TagsNotGrouped"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.ParamGroup"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.ShortSingleLine"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.TagGroupSpacing"/>
 | 
						|
    <exclude name="Drupal.Commenting.DocComment.MissingShort"/>
 | 
						|
  </rule>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/DocCommentStarSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/FileCommentSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php">
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.IncorrectTypeHint"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.InvalidReturnNotVoid"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.InvalidTypeHint"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.Missing"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.MissingFile"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.MissingParamComment"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.MissingParamType"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.MissingReturnComment"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamCommentIndentation"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamCommentNewLine"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamCommentNotCapital"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ParamTypeSpaces"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ReturnCommentIndentation"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.ReturnTypeSpaces"/>
 | 
						|
    <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
 | 
						|
  </rule>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/ControlStructures/ElseIfSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Files/EndFileNewlineSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Files/TxtFileLineLengthSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Formatting/SpaceInlineIfSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Formatting/SpaceUnaryOperatorSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Functions/DiscouragedFunctionsSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Functions/FunctionDeclarationSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/InfoFiles/AutoAddedKeysSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/InfoFiles/ClassFilesSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/InfoFiles/DuplicateEntrySniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/InfoFiles/RequiredSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Scope/MethodScopeSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/EmptyInstallSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionTSniff.php">
 | 
						|
    <exclude name="Drupal.Semantics.FunctionT.BackslashSingleQuote"/>
 | 
						|
    <exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/>
 | 
						|
    <exclude name="Drupal.Semantics.FunctionT.ConcatString"/>
 | 
						|
  </rule>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/FunctionWatchdogSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/InstallHooksSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/LStringTranslatableSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/PregSecuritySniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/TInHookMenuSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Semantics/TInHookSchemaSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/CommaSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OpenTagNewlineSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/OperatorSpacingSniff.php"/>
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/WhiteSpace/ScopeIndentSniff.php"/>
 | 
						|
 | 
						|
  <!-- Drupal Practice sniffs -->
 | 
						|
  <rule ref="../vendor/drupal/coder/coder_sniffer/DrupalPractice/Sniffs/Commenting/ExpectedExceptionSniff.php"/>
 | 
						|
 | 
						|
  <!-- Generic sniffs -->
 | 
						|
  <rule ref="Generic.Files.LineEndings"/>
 | 
						|
  <rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
 | 
						|
  <rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
 | 
						|
  <rule ref="Generic.PHP.DeprecatedFunctions"/>
 | 
						|
  <rule ref="Generic.PHP.DisallowShortOpenTag"/>
 | 
						|
  <rule ref="Generic.PHP.UpperCaseConstant"/>
 | 
						|
  <rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
 | 
						|
  <rule ref="Generic.Arrays.DisallowLongArraySyntax" />
 | 
						|
 | 
						|
  <!-- PSR-2 sniffs -->
 | 
						|
  <rule ref="PSR2.Classes.PropertyDeclaration">
 | 
						|
    <exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
 | 
						|
  </rule>
 | 
						|
 | 
						|
  <!-- Squiz sniffs -->
 | 
						|
  <rule ref="Squiz.Strings.ConcatenationSpacing">
 | 
						|
    <properties>
 | 
						|
      <property name="spacing" value="1"/>
 | 
						|
      <property name="ignoreNewlines" value="true"/>
 | 
						|
    </properties>
 | 
						|
 </rule>
 | 
						|
 | 
						|
</ruleset>
 |