Closed pokemonhan closed 4 years ago
The exclude patterns are a special kind of regex in which *
gets replaced by .*
.
Other regex special characters - like .
- will retain their normal meaning.
This is documented behaviour, see: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders
Try using this instead:
<exclude-pattern>*/*\.js$</exclude-pattern>
Thank you, its work.
It works, but, why does .js which gets expanded to `..jsexclude (for example)
index.php, in which there is no
jor
s` to be found?
@rmpel See https://github.com/squizlabs/PHP_CodeSniffer/issues/2955#issuecomment-627243324 - might be something in your file path which triggers the rule. See the more stable example to use in the comment.
On another note: This repo is abandoned and https://github.com/PHPCSStandards/PHP_CodeSniffer is its successor. See: #3932. If you need further assistance with this, I suggest you open a discussion item in the new repo.
phpcs v 3.5.5
<exclude-pattern>*/*.js</exclude-pattern>
after adding this and then below files will not able to check errors and show nothing errrors. StaticJsonHandler.php StaticJsonServiceProvider.php static_json.php