Skip to content
This repository was archived by the owner on Nov 9, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .docker/scripts/lint-theme
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash
# Code linting for SaaS project.
set -e

APP_DIR=${APP_DIR:-/app}
PROFILE_DIR=${PROFILE_DIR:-${APP_DIR}/web}

# Lint code.
${APP_DIR}/tests/vendor/bin/parallel-lint --exclude /app/tests/vendor -e php,inc,module,theme,install,profile,test ${PROFILE_DIR}/themes/custom
${APP_DIR}/tests/vendor/bin/parallel-lint --exclude /app/tests/vendor --exclude ${PROFILE_DIR}/themes/custom/*/node_modules -e php,inc,module,theme,install,profile,test ${PROFILE_DIR}/themes/custom

# Check code standards.
${APP_DIR}/tests/vendor/bin/phpcs --standard=${APP_DIR}/tests/phpcs.xml ${PROFILE_DIR}/themes/custom
Expand Down
7 changes: 5 additions & 2 deletions tests/phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset name="vahiscv">
<description>PHPCS Standard for a GoVCMS8 website, based on Drupal standards.
<ruleset name="govcms8">
<description>PHPCS Standard for a GovCMS8 website, based on Drupal standards.
</description>

<rule ref="Drupal"/>
Expand All @@ -24,6 +24,9 @@
<exclude-pattern>*library*\.js</exclude-pattern>
<exclude-pattern>*libraries*\.js</exclude-pattern>

<!-- Exclude node_modules directory. -->
<exclude-pattern>web/themes/custom/*/node_modules/*</exclude-pattern>

<!-- Exclude all features-generated files. -->
<exclude-pattern>*\.bean\.*</exclude-pattern>
<exclude-pattern>*\.context\.*</exclude-pattern>
Expand Down