Closed (fixed)
Project:
Coder
Version:
8.x-3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
7 May 2019 at 14:59 UTC
Updated:
7 May 2020 at 13:04 UTC
Jump to comment: Most recent
Comments
Comment #2
klausiIt should just work, what version of Coder are you using? Can you try again with the latest release?
Can you post the a test file where an unused use statement is not found? Then we can debug it and check.
Comment #3
dropa commentedConfirming this issue, without modifying extensions that should be checked, since 8.3.7 certain files seems not to be picked into check.
Having unused use statement in eg. .install file with 8.3.6 you will get error, but any never version after that it will not get picked. But the actual problem is that the file itself is being ignored.
This can be "fixed" by adding extensions, eg
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md .But since this has changed lately, should it be fixed?
Comment #4
klausiAh, good to know that explains it. The hard-coded list of file extensions was removed in #3074176: Allow extensions to be overridden in contrib phpcs.xml file to allow users to specify their own file extensions they want to run Coder/PHPCS on. Please always specify
--extensionswhen running phpcs or set the extensions argument in your phpcs.xml.dist config file.