<?xml version="1.0"?>

<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="AME_PHPCS_Settings">

    <description>PHPCS settings for Admin Menu Editor</description>



    <arg name="basepath" value="."/>

    <arg name="warning-severity" value="5"/>

    <arg name="error-severity" value="5"/>

    <arg value="sp"/>

    

    <!-- Check the current directory by default -->

    <file>./</file>

    

    <!-- Include the WordPress-VIP-Go standard -->

    <rule ref="WordPress-VIP-Go">

		<!-- Surely server-side caching isn't an issue for admin pages? --> 

		<exclude name="WordPressVIPMinimum.Variables.RestrictedVariables.cache_constraints___COOKIE" />

		<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.cookies_setcookie" />

		

		<!-- This plugin is not exclusive to WP VIP, so it doesn't use vip_safe_wp_remote_get() and such. -->

		<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get" />

		

		<!-- This plugin does a lot of DOM manipulation and these sniffs generate too many false positives. -->

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.append" />	

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.appendTo" />

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.prepend" />	

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.prependTo" />	

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.insertBefore" />

		<exclude name="WordPressVIPMinimum.JS.HTMLExecutingFunctions.insertAfter" />

		

		<!-- Questionable, but not a security issue or bug. -->

		<exclude name="Squiz.PHP.CommentedOutCode.Found" />

    </rule>

    

    <exclude-pattern type="relative">^/vendor/*</exclude-pattern>

    <!-- Third-party JavaScript libraries and jQuery plugins -->

    <exclude-pattern type="relative">^js/knockout\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/lodash\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/lodash\.min\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/lazyload\.min\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/jquery\.sort\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/jquery\.form\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/jquery\.qtip\.js</exclude-pattern>

    <exclude-pattern type="relative">^js/jquery\.qtip\.min\.js</exclude-pattern>

    <exclude-pattern type="relative">^css/jquery\.qtip\.css</exclude-pattern>

    <exclude-pattern type="relative">^css/jquery\.qtip\.min\.css</exclude-pattern>

    <!-- Third-party CSS parser -->

    <exclude-pattern type="relative">^includes/PHP-CSS-Parser/lib/*</exclude-pattern>

    

</ruleset>

