gocodebox / lifterlms-cs

PHP_CodeSniffer rules for LifterLMS projects
MIT License
3 stars 4 forks source link

exclude-pattern improvements #5

Open pondermatic opened 3 years ago

pondermatic commented 3 years ago

Is your feature request related to a problem? Please describe. No.

Describe the solutions you'd like

  1. Exclude all minimized JavaScript files, not just the ones is the normal assets/js/ directory.
    -    <exclude-pattern>assets/js/*.min.js</exclude-pattern>
    +    <exclude-pattern>*.min.js</exclude-pattern>
  2. Only exclude these directories if they are at the top-level path that is being filtered.
    -    <exclude-pattern>tests/*</exclude-pattern>
    +    <exclude-pattern type="relative">^tests/*</exclude-pattern>
    -    <exclude-pattern>tmp/*</exclude-pattern>
    +    <exclude-pattern type="relative">^tmp/*</exclude-pattern>
    -    <exclude-pattern>gulpfile.js/*</exclude-pattern>
    +    <exclude-pattern type="relative">^gulpfile.js/*</exclude-pattern>
  3. Limit the pattern to directories with a specific name. ./vendor/ vs. ./prefix-vendor/
    -    <exclude-pattern>vendor/*</exclude-pattern>
    +    <exclude-pattern>*/vendor/*</exclude-pattern>
    -    <exclude-pattern>node_modules/*</exclude-pattern>
    +    <exclude-pattern>*/node_modules/*</exclude-pattern>