Skip to content

A ddev ready envitonment I use to develop, test, update my Drupal contrib modules. May not work for you in some cases.

Notifications You must be signed in to change notification settings

theodorosploumis/drupal-modules

Repository files navigation

Contrib Drupal modules development

How to work

Tools

New Drupal project

Git precommit hook

See also for patterns: https://www.conventionalcommits.org/en/v1.0.0/

./pre-commit-check.sh

Code Analysis Scripts

This project includes bash scripts for running PHP CodeSniffer (phpcs) and PHP CodeSniffer Beautifier (phpcbf) with Drupal coding standards.

Scripts Available

Interactive Scripts

  • run-phpcs.sh - Interactive menu for PHP CodeSniffer checks
  • run-phpcbf.sh - Interactive menu for PHP CodeSniffer auto-fixing

Quick Command Scripts

  • quick-phpcs.sh - Quick commands for PHP CodeSniffer checks
  • quick-phpcbf.sh - Quick commands for PHP CodeSniffer auto-fixing

Usage

Quick Commands (Recommended)

# Check coding standards for all custom modules
./quick-phpcs.sh all

# Fix coding standard issues for all custom modules
./quick-phpcbf.sh all

# Check or fix specific module (will prompt for module name)
./quick-phpcs.sh my_module
./quick-phpcbf.sh my_module

# Check with detailed output
./quick-phpcs.sh detailed

# Fix with verbose output
./quick-phpcbf.sh verbose

# List available coding standards
./quick-phpcs.sh standards
./quick-phpcbf.sh standards

# Show all available commands
./quick-phpcs.sh help
./quick-phpcbf.sh help

Interactive Scripts

# Interactive menu for code checking
./run-phpcs.sh

# Interactive menu for code fixing
./run-phpcbf.sh

phpstan

ddev phpstan

phpunit

ddev phpunit

cspell

npm install cspell
npm run spellcheck web/modules/custom/

See also

About

A ddev ready envitonment I use to develop, test, update my Drupal contrib modules. May not work for you in some cases.

Resources

Stars

Watchers

Forks