phpcs.xml (2194B)
1 <?xml version="1.0"?> 2 <ruleset name="SomewhereWarm-cs"> 3 <description>SomewhereWarm Coding Standards</description> 4 5 <!-- Exclude paths --> 6 <exclude-pattern>tests/</exclude-pattern> 7 <exclude-pattern>*/node_modules/*</exclude-pattern> 8 <exclude-pattern>*/assets/*</exclude-pattern> 9 <exclude-pattern>*/vendor/*</exclude-pattern> 10 11 <!-- Configs --> 12 <config name="minimum_supported_wp_version" value="6.0" /> 13 <config name="testVersion" value="7.1-" /> 14 15 <!-- Rules --> 16 <rule ref="WooCommerce-Core"> 17 <exclude name="Core.Commenting.CommentTags.AuthorTag" /> 18 <exclude name="WordPress.PHP.DontExtract" /> 19 </rule> 20 21 <rule ref="WordPress-Extra"> 22 <exclude name="Generic.Commenting.DocComment.SpacingAfter" /> 23 <exclude name="Generic.Files.LineEndings.InvalidEOLChar" /> 24 <exclude name="Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma" /> 25 <exclude name="Generic.WhiteSpace" /> 26 <exclude name="PEAR.Functions.FunctionCallSignature" /> 27 <exclude name="Squiz.Commenting" /> 28 <exclude name="Squiz.PHP.DisallowSizeFunctionsInLoops.Found" /> 29 <exclude name="Squiz.WhiteSpace" /> 30 <exclude name="WordPress.Arrays" /> 31 <exclude name="WordPress.Files.FileName" /> 32 <exclude name="WordPress.NamingConventions" /> 33 <exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash" /> 34 <exclude name="WordPress.WP.I18n.NonSingularStringLiteralText" /> 35 <exclude name="WordPress.WhiteSpace" /> 36 <exclude name="WordPress.Security.EscapeOutput" /> 37 <exclude name="Squiz.PHP.EmbeddedPhp" /> 38 </rule> 39 40 <rule ref="PHPCompatibility"> 41 <exclude-pattern>tests/</exclude-pattern> 42 </rule> 43 44 <rule ref="WordPress.Security.EscapeOutput"> 45 <properties> 46 <!-- e.g. body_class, the_content, the_excerpt --> 47 <property name="customAutoEscapedFunctions" type="array" value="0=>woocommerce_wp_select,1=>wcs_help_tip,2=>admin_url,3=>wc_price"/> 48 <!-- e.g. esc_attr, esc_html, esc_url--> 49 <property name="customEscapingFunctions" type="array" value="0=>wcs_json_encode,1=>htmlspecialchars,2=>wp_kses_allow_underscores"/> 50 <!-- e.g. _deprecated_argument, printf, _e--> 51 <property name="customPrintingFunctions" type="array" value=""/> 52 </properties> 53 </rule> 54 55 </ruleset>