Skip to content

Commit bde9f73

Browse files
authored
Added support for DrupalSecure
There is a project which Drupal.org uses when creating a project (besides Drupal coding standard check) which checks common security issues. It would be nice to have it in this docker image. docker run --rm -v $(pwd):/work skilldlabs/docker-phpcs-drupal phpcbf --standard=DrupalSecure https://www.drupal.org/sandbox/coltrane/1921926
1 parent 64411c1 commit bde9f73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ RUN apk add --no-cache \
1616
php7-zlib \
1717
curl \
1818
patch \
19+
git \
1920
&& ln -s /usr/bin/php7 /usr/bin/php \
2021
&& curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/bin \
2122
&& composer global require drupal/coder \
2223
&& ln -s /root/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcs /usr/bin/phpcs \
2324
&& ln -s /root/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcbf /usr/bin/phpcbf \
2425
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/Drupal /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Drupal \
25-
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/DrupalPractice
26+
&& ln -s /root/.composer/vendor/drupal/coder/coder_sniffer/DrupalPractice /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/DrupalPractice \
27+
&& git clone --branch master https://git.drupal.org/sandbox/coltrane/1921926.git /root/drupalsecure_code_sniffs \
28+
&& ln -s /root/drupalsecure_code_sniffs/DrupalSecure /root/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/DrupalSecure
2629

2730
VOLUME /work
2831
WORKDIR /work

0 commit comments

Comments
 (0)