![]() ![]() In your project where you have yourĬomposer.json file execute this: composer require -dev drupal/coder Your other development dependencies locally. Local installation in your Drupal projectįor collaborating developer teams it makes sense to lock a Coder version with To make the phpcs and phpcbf commands available globally, add the Composerīin path to your $PATH variable in ~/.profile, ~/.bashrc or ~/.zshrc: export PATH="$PATH:$HOME/.config/composer/vendor/bin"Ĭheck Drupal coding standards phpcs -standard=Drupal -extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /file/to/drupal/example_moduleĬheck Drupal best practices phpcs -standard=DrupalPractice -extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /file/to/drupal/example_moduleĪutomatically fix coding standards phpcbf -standard=Drupal -extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml /file/to/drupal/example_module ![]() ( ~/.config/composer): composer global require drupal/coder Install Coder (8.3.x) in your global Composer directory in your home directory If you get composer not found or similar, follow Composer's installation Global installationįirst, make sure Composer is installed correctly: which composer To check and fix Javascript filesĭrupal ESLint documentation. Note that Javascript support has been removed. "DrupalPractice": Best practices for Drupal module development. ![]() Coder is a library for automated Drupal code reviews and coding standard fixes. ![]()
0 Comments
Leave a Reply. |