diff --git a/README.md b/README.md index 2721e7e..cd97990 100644 --- a/README.md +++ b/README.md @@ -71,3 +71,20 @@ a11y test for a custom admin theme ``` ddev nightwatch --tag a11y:admin --adminTheme seven ``` + +## Core Linting + +This will run static tests against core standards. + +``` +ddev drupal lint:phpstan +ddev drupal lint:phpcs +ddev drupal lint:js +ddev drupal lint:css +ddev drupal lint:cspell +# CSpell against only modified files +ddev drupal lint:cspell --modified-only +``` + +You can run all linting with `ddev drupal lint`, or with fail-fast turned on: +`ddev drupal lint --stop-on-failure` \ No newline at end of file diff --git a/commands/web/drupal b/commands/web/drupal index 2e82267..ac34e2f 100755 --- a/commands/web/drupal +++ b/commands/web/drupal @@ -15,12 +15,18 @@ use Drupal\Core\Command\GenerateTheme; use Drupal\Core\Command\InstallCommand; -use Symfony\Component\Console\Application; -use DrupalCoreDev\Command\CacheCommand; use DrupalCoreDev\Command\AdminLoginCommand; -use DrupalCoreDev\Command\TestCommand; +use DrupalCoreDev\Command\CacheCommand; +use DrupalCoreDev\Command\LintCommand; +use DrupalCoreDev\Command\LintCspellCommand; +use DrupalCoreDev\Command\LintCssCommand; +use DrupalCoreDev\Command\LintJsCommand; +use DrupalCoreDev\Command\LintPhpCsCommand; +use DrupalCoreDev\Command\LintPhpStanCommand; use DrupalCoreDev\Command\TestBrowserCommand; +use DrupalCoreDev\Command\TestCommand; use DrupalCoreDev\Command\UninstallCommand; +use Symfony\Component\Console\Application; if (PHP_SAPI !== 'cli') { return; @@ -39,5 +45,11 @@ $application->add(new AdminLoginCommand($loader)); $application->add(new TestCommand()); $application->add(new TestBrowserCommand()); $application->add(new UninstallCommand()); +$application->add(new LintPhpCsCommand()); +$application->add(new LintPhpStanCommand()); +$application->add(new LintCssCommand()); +$application->add(new LintJsCommand()); +$application->add(new LintCspellCommand()); +$application->add(new LintCommand()); $application->run(); diff --git a/core-dev/phpunit-chrome.xml b/core-dev/phpunit-chrome.xml index a4888bd..0c58d78 100644 --- a/core-dev/phpunit-chrome.xml +++ b/core-dev/phpunit-chrome.xml @@ -1,5 +1,6 @@ @@ -36,7 +37,7 @@ @@ -36,7 +37,7 @@