llnl / blt-phpmd
Tests php mess detector rules against custom modules, themes, and profile files.
Installs: 3 714
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 3
Open Issues: 2
Requires
- phpmd/phpmd: ^2.12
This package is auto-updated.
Last update: 2024-10-14 18:26:34 UTC
README
This is an Acquia BLT plugin providing a process for testing code using PHP Mess Detector.
LLNL does not provide any direct support for this software or provide any warranty as to its stability.
Installation and usage
To use this plugin, you must already have a Drupal project using BLT 13.
- Add this plugin to your project using composer:
composer require llnl/blt-phpmd
- Initialize the exclude settings for your project:
blt recipes:config:init:phpmd
-
Update your
blt.yml
file with the list of modules you wish to exclude from phpmd validation. It is valid to have no modules to exclude from testing. -
Copy the
phpmd.xml.dist
file tophpmd.xml
in the root directory of your project and configure rules according to PHPMD
There are two commands included validate:phpmd:files
and validate:phpmd:file
.
validate:phpmd:files
will check all files in the docroot/modules/custom
, docroot/themes/custom
, and
docroot/profiles/custom
paths.
validate:phpmd:file
expects a comma separated list of files to test. If given a directory, it will test
all files in that path. This is useful for CI testing of files changed or in local testing while coding.
Release
SPDX-License-Identifier: GPL-2.0-or-later
LLNL-CODE-839162