https://github.com/hussainweb/drupal-code-quality
Docker image containing various QA tools for Drupal
https://github.com/hussainweb/drupal-code-quality
code-quality codespell docker docker-image drupal drupal-8 pdepend php php-codesniffer phpcpd phploc phpmd phpmetrics phpqatools phpunit static-analysis static-code-analysis
Last synced: 4 months ago
JSON representation
Docker image containing various QA tools for Drupal
- Host: GitHub
- URL: https://github.com/hussainweb/drupal-code-quality
- Owner: hussainweb
- License: mit
- Created: 2017-06-21T21:48:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-05T09:46:02.000Z (over 8 years ago)
- Last Synced: 2025-04-22T12:35:59.265Z (6 months ago)
- Topics: code-quality, codespell, docker, docker-image, drupal, drupal-8, pdepend, php, php-codesniffer, phpcpd, phploc, phpmd, phpmetrics, phpqatools, phpunit, static-analysis, static-code-analysis
- Homepage: https://hub.docker.com/r/hussainweb/drupal-code-quality/
- Size: 3.91 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# drupal-code-quality
[Drupal Code Quality](https://hub.docker.com/r/hussainweb/drupal-code-quality/) is a Docker image designed to aid in static analysis for Drupal code bases. It is based off [Adam Culp's PHP Code Quality](https://hub.docker.com/r/adamculp/php-code-quality/) Docker image. Therefore, all tools present in adamculp/php-code-quality are also present here. See [README.md in that package](https://github.com/adamculp/php-code-quality/blob/master/README.md) for more details.
From a Drupal perspective, this Docker image adds:
- [drupal/coder](https://packagist.org/packages/drupal/coder)
- [drupalsecure sniffs](http://git.drupal.org/sandbox/coltrane/1921926)
- [PAReview.sh](https://github.com/klausi/pareviewsh)
- [codespell](https://github.com/lucasdemarchi/codespell)
- [eslint](https://github.com/eslint/eslint)
- [stylelint](https://github.com/stylelint/stylelint)
## Usage
Run these commands in your repository's root directory. The commands below assume that the Drupal site lives under the `docroot` directory.
### Get to a shell
This is the simplest command to get into a shell with your code mounted under `/app`.
```
docker run -it --rm -v "$PWD":/app -w /app hussainweb/drupal-code-quality:latest bash
```
### Run phpcs with Drupal coder sniffs
```
docker run -it --rm -v "$PWD":/app -w /app hussainweb/drupal-code-quality:latest phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme docroot/modules/custom/ docroot/themes/custom/
```
Refer to [adamculp/php-code-quality's Usage](https://github.com/adamculp/php-code-quality/blob/master/README.md#usage) for more details.