Skip to content

Instantly share code, notes, and snippets.

View bdlangton's full-sized avatar

Barrett Langton bdlangton

View GitHub Profile
@bdlangton
bdlangton / phpcs.txt
Last active May 27, 2022 00:49
phpcs config-set for Drupal using Coder module
# Basic default configs.
phpcs --config-set installed_paths ~/.composer/vendor/drupal/coder/coder_sniffer
phpcs --config-set default_standard Drupal
phpcs --config-set colors 1
# Show all errors.
phpcs --config-set error-severity 1
# Shows warnings, but doesn't return a non-zero return.
phpcs --config-set ignore_warnings_on_exit 1
@bdlangton
bdlangton / README.md
Last active June 1, 2022 19:13
Git hooks

Install required packages

Install the packages that you'll need. Drupal/coder includes phpcs. If you're not wanting to use a specific hook, then you don't need to install the associated packages.

composer global require drupal/coder phpmd/phpmd sebastian/phpcpd

Set path

Set the path in your shell startup script (ex: .zshrc or .bashrc).

@bdlangton
bdlangton / drupal_mail
Created July 20, 2016 15:21
Set smtp mail system enabled w/maillog. Disable sending emails, but log them.
# Put in settings.php.
$conf['mail_system'] = array('default-system' => 'SmtpMailSystem');
$conf['smtp_deliver'] = '1';
$conf['maillog_devel'] = '1';
$conf['maillog_log'] = '1';
$conf['maillog_send'] = '0';
$conf['maillog_engine'] = 'SmtpMailSystem';