I doubt you would use CS for that as its not code. Look at pre-commit hooks if you are using git.
PHP_CodeSniffer to check for file extensions in a folder
-
30-05-2022 - |
Question
I am using the CakePHP framework, and would like to have PHP_CodeSniffer warn against image files that developers might in a haste, paste into the app/webroot/css
folder while copying in something, as opposed to moving them into an appropriate folder in app/webroot/img
.
Is this a bad idea? If not, how do I write a custom sniff to do this?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow