Skip to content
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
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ jobs:
command: docker compose exec -T cli vendor/bin/rector --dry-run || [ "${VORTEX_CI_RECTOR_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_RECTOR

#;< TOOL_TWIG_CS_FIXER
- run:
name: Lint code with Twig CS Fixer
command: docker compose exec -T cli vendor/bin/twig-cs-fixer || [ "${VORTEX_CI_TWIG_CS_FIXER_IGNORE_FAILURE:-0}" -eq 1 ]
#;> TOOL_TWIG_CS_FIXER

#;< TOOL_BEHAT
- run:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ jobs:
continue-on-error: ${{ vars.VORTEX_CI_RECTOR_IGNORE_FAILURE == '1' }}
#;> TOOL_RECTOR

#;< TOOL_TWIG_CS_FIXER
- name: Lint code with Twig CS Fixer
run: docker compose exec -T cli vendor/bin/twig-cs-fixer
continue-on-error: ${{ vars.VORTEX_CI_TWIG_CS_FIXER_IGNORE_FAILURE == '1' }}
#;> TOOL_TWIG_CS_FIXER

#;< TOOL_BEHAT
- name: Lint code with Gherkin Lint
Expand Down
440 changes: 223 additions & 217 deletions .vortex/docs/static/img/installer.json

Large diffs are not rendered by default.

Binary file modified .vortex/docs/static/img/installer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .vortex/docs/static/img/installer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions .vortex/installer/src/Prompts/Handlers/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Tools extends AbstractHandler {

const JEST = 'jest';

const TWIG_CS_FIXER = 'twig_cs_fixer';

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -68,6 +70,7 @@ public function default(array $responses): null|string|bool|array {
self::PHPUNIT,
self::RECTOR,
self::STYLELINT,
self::TWIG_CS_FIXER,
];
}

Expand Down Expand Up @@ -445,6 +448,21 @@ public static function getToolDefinitions(string $filter = 'all'): array {
],
],

self::TWIG_CS_FIXER => [
'title' => 'Twig CS Fixer',
'present' => fn(): mixed => File::contains($this->dstDir . '/composer.json', 'vincentlanglet/twig-cs-fixer') ||
File::exists($this->dstDir . '/.twig-cs-fixer.php'),
'composer.json' => function (JsonManipulator $cj): void {
$cj->removeSubNode('require-dev', 'vincentlanglet/twig-cs-fixer');
},
'files' => ['.twig-cs-fixer.php'],
'strings' => ['/^.*\btwig-cs-fixer\b.*\n?/m'],
'ahoy' => [
'ahoy cli vendor/bin/twig-cs-fixer lint --fix',
'ahoy cli vendor/bin/twig-cs-fixer lint',
],
],

// Tool groups with shared resources.
'backend_linting' => [
'tools' => [self::PHPCS, self::PHPSTAN, self::RECTOR],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@@ -206,7 +206,6 @@
lint-fe:
usage: Lint front-end code.
cmd: |
- ahoy cli vendor/bin/twig-cs-fixer lint
ahoy cli "yarn run lint"
ahoy cli "yarn run --cwd=\${WEBROOT}/themes/custom/\${DRUPAL_THEME} lint"

@@ -238,7 +237,6 @@
lint-fe-fix:
usage: Fix lint issues of front-end code.
cmd: |
- ahoy cli vendor/bin/twig-cs-fixer lint --fix
ahoy cli "yarn run lint-fix"
ahoy cli "yarn run --cwd=\${WEBROOT}/themes/custom/\${DRUPAL_THEME} lint-fix"

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -40,7 +40,6 @@
**/.data
**/.logs
**/.phpunit.cache
-**/.twig-cs-fixer.cache

# Database cache key files written into the workspace by the CI workflow.
db_cache_*
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@@ -158,10 +158,6 @@
run: docker compose exec -T cli vendor/bin/rector --dry-run
continue-on-error: ${{ vars.VORTEX_CI_RECTOR_IGNORE_FAILURE == '1' }}

- - name: Lint code with Twig CS Fixer
- run: docker compose exec -T cli vendor/bin/twig-cs-fixer
- continue-on-error: ${{ vars.VORTEX_CI_TWIG_CS_FIXER_IGNORE_FAILURE == '1' }}
-
- name: Lint code with Gherkin Lint
run: docker compose exec -T cli vendor/bin/gherkinlint lint tests/behat/features
continue-on-error: ${{ vars.VORTEX_CI_GHERKIN_LINT_IGNORE_FAILURE == '1' }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@@ -51,7 +51,6 @@
.data
.logs
.phpunit.cache
-.twig-cs-fixer.cache

# Local override files.
/docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@@ -57,8 +57,7 @@
"phpstan/phpstan": "__VERSION__",
"phpunit/phpunit": "__VERSION__",
"pyrech/composer-changelogs": "__VERSION__",
- "rector/rector": "__VERSION__",
- "vincentlanglet/twig-cs-fixer": "__VERSION__"
+ "rector/rector": "__VERSION__"
},
"conflict": {
"drupal/drupal": "*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@@ -206,7 +206,6 @@
lint-fe:
usage: Lint front-end code.
cmd: |
- ahoy cli vendor/bin/twig-cs-fixer lint
ahoy cli "yarn run lint"
ahoy cli "yarn run --cwd=\${WEBROOT}/themes/custom/\${DRUPAL_THEME} lint"

@@ -238,7 +237,6 @@
lint-fe-fix:
usage: Fix lint issues of front-end code.
cmd: |
- ahoy cli vendor/bin/twig-cs-fixer lint --fix
ahoy cli "yarn run lint-fix"
ahoy cli "yarn run --cwd=\${WEBROOT}/themes/custom/\${DRUPAL_THEME} lint-fix"

Loading