Skip to content
Snippets Groups Projects
phpcs.xml 1.18 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?xml version="1.0"?>
    <ruleset name="CMW.WordPress">
    
    
    Christian Wach's avatar
    Christian Wach committed
    	<!-- Add source codes in the report. -->
    
    	<arg value="s"/>
    	<arg name="colors"/>
    
    	<!-- Check all PHP files in directory tree by default. -->
    	<arg name="extensions" value="php"/>
    	<file>.</file>
    
    	<rule ref="WordPress">
    
    
    		<!-- Allow slash-delimited hooks. -->
    
    		<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
    
    
    Christian Wach's avatar
    Christian Wach committed
    		<!-- PSR4: Allow short file names. -->
    		<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
    
    		<!-- Allow example code blocks. -->
    		<exclude name="Squiz.PHP.CommentedOutCode.Found" />
    		<exclude name="Squiz.Commenting.BlockComment.HasEmptyLineBefore" />
    
    
    	</rule>
    
    	<rule ref="WordPress.WP.I18n">
    		<properties>
    			<property name="text_domain" type="array" value="conditional-form-actions-for-acfe" />
    		</properties>
    	</rule>
    
    
    Christian Wach's avatar
    Christian Wach committed
    	<!-- Enforce short array syntax. -->
    
    	<rule ref="Generic.Arrays.DisallowShortArraySyntax.Found">
    		<severity>0</severity>
    	</rule>
    	<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"/>
    
    
    Christian Wach's avatar
    Christian Wach committed
    	<!-- Nesting levels. -->
    
    	<rule ref="Generic.Metrics.NestingLevel">
    		<properties>
    
    Christian Wach's avatar
    Christian Wach committed
    			<property name="absoluteNestingLevel" value="4"/>
    
    		</properties>
    	</rule>
    
    </ruleset>