Skip to content

Commit 1f007c6

Browse files
committed
Add some information to README.md along with basic examples
1 parent e1a2000 commit 1f007c6

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
11
# drupal-code-quality
2-
https://hub.docker.com/r/hussainweb/drupal-code-quality/
2+
[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.
3+
4+
From a Drupal perspective, this Docker image adds:
5+
- [drupal/coder](https://packagist.org/packages/drupal/coder)
6+
- [drupalsecure sniffs](http://git.drupal.org/sandbox/coltrane/1921926)
7+
- [PAReview.sh](https://github.com/klausi/pareviewsh)
8+
- [codespell](https://github.com/lucasdemarchi/codespell)
9+
- [eslint](https://github.com/eslint/eslint)
10+
- [stylelint](https://github.com/stylelint/stylelint)
11+
12+
## Usage
13+
Run these commands in your repository's root directory. The commands below assume that the Drupal site lives under the `docroot` directory.
14+
15+
### Get to a shell
16+
This is the simplest command to get into a shell with your code mounted under `/app`.
17+
18+
```
19+
docker run -it --rm -v "$PWD":/app -w /app hussainweb/drupal-code-quality:latest bash
20+
```
21+
22+
### Run phpcs with Drupal coder sniffs
23+
24+
```
25+
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/
26+
```
27+
28+
Refer to [adamculp/php-code-quality's Usage](https://github.com/adamculp/php-code-quality/blob/master/README.md#usage) for more details.

0 commit comments

Comments
 (0)