You are here

06-test-source-code.sh in Thunder 8.2

Same filename and directory in other branches
  1. 8.3 scripts/travis/06-test-source-code.sh
#!/usr/bin/env bash

# run phpcs
phpcs --config-set installed_paths ${TEST_DIR}/vendor/drupal/coder/coder_sniffer
# Ignore check of .md files, because they should be able to contain more then 80 characters per line.
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --ignore=*.md -p .
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme -p .

# JS ESLint checking
if ! [ -x "$(command -v eslint)" ]; then
    npm install -g eslint
fi
eslint .

# Check for deprecated methods.
cd ${TEST_DIR}
cp ${THUNDER_DIST_DIR}/phpstan.neon.dist phpstan.neon
phpstan analyse --memory-limit 300M ${TEST_DIR}/docroot/profiles/contrib/thunder

File

scripts/travis/06-test-source-code.sh
View source
  1. #!/usr/bin/env bash
  2. # run phpcs
  3. phpcs --config-set installed_paths ${TEST_DIR}/vendor/drupal/coder/coder_sniffer
  4. # Ignore check of .md files, because they should be able to contain more then 80 characters per line.
  5. phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme --ignore=*.md -p .
  6. phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme -p .
  7. # JS ESLint checking
  8. if ! [ -x "$(command -v eslint)" ]; then
  9. npm install -g eslint
  10. fi
  11. eslint .
  12. # Check for deprecated methods.
  13. cd ${TEST_DIR}
  14. cp ${THUNDER_DIST_DIR}/phpstan.neon.dist phpstan.neon
  15. phpstan analyse --memory-limit 300M ${TEST_DIR}/docroot/profiles/contrib/thunder