Last active
January 6, 2022 11:58
-
-
Save iqbalrony/97b68240ddea209008d7218fd938bff3 to your computer and use it in GitHub Desktop.
Custom Coding Standards ruleset for WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="IqbalRony-Custom" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> | |
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | |
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml --> | |
<!-- Set a description for this ruleset. --> | |
<description>IqbalRony Custom Coding Standards</description> | |
<arg name="parallel" value="8" /> | |
<!-- Exclude paths --> | |
<exclude-pattern>src/</exclude-pattern> | |
<exclude-pattern>build/</exclude-pattern> | |
<exclude-pattern>assets/</exclude-pattern> | |
<exclude-pattern>images/</exclude-pattern> | |
<exclude-pattern>*/i18n/*</exclude-pattern> | |
<exclude-pattern>*/node_modules/*</exclude-pattern> | |
<exclude-pattern>*/vendor/*</exclude-pattern> | |
<exclude-pattern>*/css/*</exclude-pattern> | |
<exclude-pattern>*/js/*</exclude-pattern> | |
<exclude-pattern>*/style.css</exclude-pattern> | |
<!-- StrictComparisons rull modified --> | |
<rule ref="WordPress.PHP.StrictComparisons"> | |
<severity>2|3</severity> | |
</rule> | |
<rule ref="WordPress-Extra"> | |
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing"/> | |
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/> | |
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/> | |
<!-- <exclude name="WordPress.NamingConventions.ValidHookName"/> --> | |
<exclude name="WordPress.NamingConventions.ValidHookName.NotLowercase"/> | |
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores"/> | |
<exclude name="Generic.Commenting.DocComment.MissingShort" /> | |
<!-- <exclude name="Generic.Formatting.MultipleStatementAlignment" /> --> | |
<!-- <exclude name="WordPress.Arrays.MultipleStatementAlignment" /> --> | |
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" /> | |
<exclude name="Squiz.Commenting.ClassComment.Missing" /> | |
<exclude name="Squiz.Commenting.FileComment.Missing" /> | |
<exclude name="Squiz.Commenting.FunctionComment.Missing" /> | |
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" /> | |
<exclude name="Squiz.Commenting.VariableComment.Missing" /> | |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen" /> | |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen" /> | |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd" /> | |
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterEnd" /> | |
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification" /> | |
<!-- <exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/> | |
<exclude name="WordPress.Security.EscapeOutput.UnsafePrintingFunction" /> --> | |
<exclude name="WordPress.Security.NonceVerification.NoNonceVerification"/> | |
<exclude name="WordPress.Security.NonceVerification.Missing"/> | |
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" /> | |
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralSingle" /> | |
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralPlural" /> | |
<!-- <exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" /> --> | |
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet" /> | |
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" /> | |
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" /> | |
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" /> | |
<exclude name="Generic.Arrays.DisallowLongArraySyntax.Found"/> | |
</rule> | |
<rule ref="WordPress.WP.DeprecatedFunctions"> | |
<properties> | |
<property name="minimum_supported_version" value="4.7" /> | |
</properties> | |
</rule> | |
<rule ref="WordPress.NamingConventions.ValidHookName"> | |
<properties> | |
<property name="additionalWordDelimiters" value="/-" /> | |
</properties> | |
</rule> | |
<!-- Text Domain --> | |
<rule ref="WordPress.WP.I18n"> | |
<properties> | |
<property name="text_domain" type="array"> | |
<element key="plugins/happy-elementor-addons" value="happy-elementor-addons"/> | |
<element key="plugins/happy-elementor-addons-pro" value="happy-addons-pro"/> | |
<element key="plugins/eazygrid-elementor" value="eazygrid-elementor"/> | |
<element key="plugins/eazyfilter" value="eazyfilter"/> | |
</property> | |
</properties> | |
</rule> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment