phpcs and phpcbf are readily available in up-to-date version of cli container.
It's recommended to see how to extend fin with custom commands first.
From your project's root folder (where .docksal folder is):
-
Download example
phpcscommandmkdir -p .docksal/commands curl https://raw.githubusercontent.com/docksal/docksal/develop/examples/.docksal/commands/phpcs -ko .docksal/commands/phpcs chmod +x .docksal/commands/phpcs -
Use as
fin phpcs docroot/sites/all/modules/customor any path you want to run sniffer against. Seefin help phpcs -
Modify
.docksal/commands/phpcsscript as you need -
In the same way you can create script for
phpcbfas it uses the same set of parameters
Instead of installing custom command you can just enter it manually every time.
From your project's root folder run
fin run phpcs \
--standard=Drupal -n \
--extensions="php,module,inc,install,test,profile,theme" \
--ignore="*.features.*,*.pages*.inc" \
docroot/sites/all/modules/customfin run phpcbf \
--standard=Drupal -n \
--extensions="php,module,inc,install,test,profile,theme" \
--ignore="*.features.*,*.pages*.inc" \
docroot/sites/all/modules/custom