mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 00:16:13 +01:00

[TASK] Add xliff linting locally (#1071)

Resolves: #346
This commit is contained in:
Łukasz Uznański 2023-12-15 16:17:39 +01:00 committed by GitHub
parent 95c2801755
commit 5f51604f14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 8 deletions

View file

@ -18,6 +18,8 @@ updates:
- dependency-name: "doctrine/dbal"
- dependency-name: "phpunit/phpunit"
versions: [ "^10.0" ]
- dependency-name: "symfony/console"
- dependency-name: "symfony/translation"
- dependency-name: "symfony/yaml"
- dependency-name: "typo3/cms-*"
versioning-strategy: "increase"

View file

@ -75,6 +75,7 @@ jobs:
- "php:stan"
- "ts:lint"
- "yaml:lint"
- "xliff:lint"
php-version:
- "8.1"
code-quality-frontend:
@ -93,14 +94,6 @@ jobs:
run: yarn
- name: "Run command"
run: "yarn lint:${{ matrix.command }}"
xliff-lint:
name: "Xliff linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Run the xliff lint"
uses: TYPO3-Continuous-Integration/TYPO3-CI-Xliff-Lint@v1
unit-tests:
name: "Unit tests"
runs-on: ubuntu-22.04

14
Build/bin/console Normal file
View file

@ -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());

View file

@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
## x.y.z
### Added
- Add Composer script for XLIFF linting (#1071)
- Add polish translation for tea (#1020)
- Make records timeable and hideable (#989)
- Add support for PHP 8.3 (#965)

View file

@ -59,6 +59,8 @@
"saschaegerer/phpstan-typo3": "^1.9.1",
"seld/jsonlint": "^1.10.0",
"squizlabs/php_codesniffer": "^3.8.0",
"symfony/console": "^5.4 || ^6.4",
"symfony/translation": "^5.4 || ^6.4",
"symfony/yaml": "^5.3.6 || ^6.2.0",
"tomasvotruba/type-coverage": "^0.2.1",
"typo3/cms-fluid-styled-content": "^11.5.4 || ^12.4.0",
@ -154,6 +156,7 @@
],
"ci:tests:unit": ".Build/bin/phpunit -c ./Tests/Unit/UnitTests.xml Tests/Unit",
"ci:ts:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
"ci:xliff:lint": "php Build/bin/console lint:xliff Resources/Private/Language",
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -regextype egrep -regex '.*.ya?ml$' | xargs -r php ./.Build/bin/yaml-lint",
"coverage:create-directories": "mkdir -p .Build/logs .Build/coverage",
"docs:generate": [
@ -212,6 +215,7 @@
"ci:tests:functional": "Runs the functional tests.",
"ci:tests:unit": "Runs the unit tests.",
"ci:ts:lint": "Lints the TypoScript files.",
"ci:xliff:lint": "Lints the XLIFF files.",
"ci:yaml:lint": "Lints the YAML files.",
"coverage:create-directories": "Creates the directories needed for recording and merging the code coverage reports.",
"docs:generate": "Renders the extension ReST documentation.",