Skip to content

Commit

Permalink
[FEATURE] Add XLIFF linting to the CI workflow
Browse files Browse the repository at this point in the history
Fixes #1773
  • Loading branch information
oliverklee committed Sep 16, 2024
1 parent c7e5a87 commit 1fdcef9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
/.phive/ export-ignore
/.php-cs-fixer.php export-ignore
/.php_cs.dist export-ignore
/Build/ export-ignore
/CODE_OF_CONDUCT.md export-ignore
/Configuration/FunctionalTests.xml export-ignore
/Configuration/UnitTests.xml export-ignore
/CODE_OF_CONDUCT.md export-ignore
/Resources/Private/Patches/ export-ignore
/Tests/ export-ignore
/crowdin.yml export-ignore
Expand Down
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ updates:
- dependency-name: "phpunit/phpunit"
versions: [ ">= 10" ]
- dependency-name: "sjbr/static-info-tables"
- dependency-name: "symfony/*"
- dependency-name: "typo3/cms-*"
- dependency-name: "typo3/coding-standards"
versions: [ ">= 0.7.0" ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ jobs:
- "php:cs-fixer"
- "php:sniff"
- "php:stan"
- "xliff:lint"
php-version:
- "8.3"
rector:
Expand Down
14 changes: 14 additions & 0 deletions Build/bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env php
<?php

include_once __DIR__ . '/../../.Build/vendor/autoload.php';

use Symfony\Component\Console\Application;
use Symfony\Component\Translation\Command\XliffLintCommand;
use Symfony\Component\Yaml\Command\LintCommand;

$application = new Application();
$application->add(new XliffLintCommand(null, null, null, false));
$application->add(new LintCommand());

exit($application->run());
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Added

- Add XLIFF linting to the CI workflow (#1907)

### Changed

- Require Fluid >= 2.7.4 (#1906)
Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"squizlabs/php_codesniffer": "3.10.2",
"ssch/typo3-rector": "2.6.5",
"ssch/typo3-rector-testing-framework": "2.0.1",
"symfony/translation": "^5.4.42 || ^6.3.12 || ^7.1.3",
"typo3/coding-standards": "0.6.1",
"typo3/testing-framework": "7.1.0",
"webmozart/assert": "^1.11.0"
Expand Down Expand Up @@ -125,14 +126,16 @@
"@ci:php:lint",
"@ci:php:sniff",
"@ci:php:cs-fixer",
"@ci:php:stan"
"@ci:php:stan",
"@ci:xliff:lint"
],
"ci:tests": [
"@ci:tests:unit",
"@ci:tests:functional"
],
"ci:tests:functional": "find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo \"Running functional test suite {}\"; .Build/vendor/bin/phpunit -c Configuration/FunctionalTests.xml {}';",
"ci:tests:unit": ".Build/vendor/bin/phpunit -c Configuration/UnitTests.xml Tests/Unit",
"ci:xliff:lint": "php Build/bin/console lint:xliff Resources/Private/Language",
"coverage:create-directories": "mkdir -p build/logs .Build/coverage",
"fix": [
"@fix:composer",
Expand All @@ -151,6 +154,7 @@
"rm -rf .Build",
"rm -rf .github",
"rm -rf .phive",
"rm -rf Build",
"rm -rf Tests",
"rm -rf tools",
"rm .editorconfig",
Expand All @@ -177,6 +181,7 @@
"ci:php:rector": "Checks for code for changes by Rector.",
"ci:php:stan": "Checks the types with PHPStan.",
"ci:static": "Runs all static code analysis checks for the code.",
"ci:xliff:lint": "Lints the XLIFF files.",
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
"fix": "Runs all automatic code style fixes.",
"fix:composer": "Normalizes all composer.json files.",
Expand Down

0 comments on commit 1fdcef9

Please sign in to comment.