2017 © Pedro Peláez
 

project drupal-quality-checker

Setups code quality checking tools for Drupal project.

image

vijaycs85/drupal-quality-checker

Setups code quality checking tools for Drupal project.

  • Sunday, December 10, 2017
  • by vijaycs85
  • Repository
  • 1 Watchers
  • 8 Stars
  • 533 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 49 % Grown

The README.md

# Drupal Code Quality Checker

Overview

Provides set of libraries to easily setup code quality checks based on GrumPHP for Drupal module/theme/profile. Check out this Lullabot article for more details., (*1)

Note: This library aim to help contributed/custom Drupal module/theme/profile hosted in individual git repository., (*2)

Install

  1. Add vijaycs85/drupal-quality-checker to composer.json (like here) or just composer require --dev vijaycs85/drupal-quality-checker
  2. Replace grumphp.yml in project's root directory (not Drupal root directory) with vendor/vijaycs85/drupal-quality-checker/grumphp.yml.dist

That's it. Now, all tasks (listed below) run on every git commit., (*3)

Note: As part of install, GrumPHP adds pre-commit hook to repository. Existing pre-commit might get destroyed when install/uninstall., (*4)

Features

  1. PHPCS with Drupal standard.
  2. PHP Lint
  3. YAML Lint
  4. Composer
  5. Composer Normalize
  6. JSONLint
  7. PHP Copy/Paste Detector (CPD)

Long list of additional checks/validators available here., (*5)

Sample

Pass

drupal-quality-checker-pass, (*6)

Fail

drupal-quality-checker-fail, (*7)

Demo

Implemented in Modal Configuration module., (*8)

The Versions