mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-23 18:36:12 +01:00

[WIP][TASK] Add editor config linting

WIP:
    * Add GitLab and GitHub Jobs

Resolves: #498
This commit is contained in:
Daniel Siepmann 2023-11-27 16:36:56 +01:00
parent a5ab4c9e1e
commit 7d78c8ae5b
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
6 changed files with 24 additions and 9 deletions

View file

@ -25,12 +25,11 @@ indent_size = 2
# ReST files # ReST files
[{*.rst,*.rst.txt}] [{*.rst,*.rst.txt}]
indent_size = 4 indent_size = 4
max_line_length = 80
# SQL files # SQL files
[*.sql] [*.sql]
indent_style = tab indent_style = space
indent_size = 2 indent_size = 4
# TypoScript files # TypoScript files
[*.{typoscript,tsconfig}] [*.{typoscript,tsconfig}]
@ -47,7 +46,3 @@ indent_style = tab
# .htaccess # .htaccess
[.htaccess] [.htaccess]
indent_style = tab indent_style = tab
# Markdown files
[*.md]
max_line_length = 80

1
.gitattributes vendored
View file

@ -12,6 +12,7 @@
/.prettierrc.js export-ignore /.prettierrc.js export-ignore
/Build/ export-ignore /Build/ export-ignore
/Tests/ export-ignore /Tests/ export-ignore
/ec-cli-config.php export-ignore
/package.json export-ignore /package.json export-ignore
/phive.xml export-ignore /phive.xml export-ignore
/phpcs.xml export-ignore /phpcs.xml export-ignore

View file

@ -1,4 +1,4 @@
.. More information about this file: .. More information about this file:
https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#includes-rst-txt https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/GeneralConventions/FileStructure.html#includes-rst-txt
.. ---------- .. ----------

View file

@ -54,4 +54,3 @@ code changes) more of a hassle.
For this approach, the For this approach, the
`TYPO3 testing framework <https://github.com/TYPO3/testing-framework>`__ `TYPO3 testing framework <https://github.com/TYPO3/testing-framework>`__
- which supports only one TYPO3 LTS version at a time - will work just fine. - which supports only one TYPO3 LTS version at a time - will work just fine.

View file

@ -47,6 +47,7 @@
"typo3/cms-frontend": "^11.5.4 || ^12.4" "typo3/cms-frontend": "^11.5.4 || ^12.4"
}, },
"require-dev": { "require-dev": {
"armin/editorconfig-cli": "^1.7",
"doctrine/dbal": "^2.13.5 || ^3.6.2", "doctrine/dbal": "^2.13.5 || ^3.6.2",
"ergebnis/composer-normalize": "^2.28.3", "ergebnis/composer-normalize": "^2.28.3",
"friendsofphp/php-cs-fixer": "^3.40.0", "friendsofphp/php-cs-fixer": "^3.40.0",
@ -133,6 +134,7 @@
"ci:dynamic": [ "ci:dynamic": [
"@ci:tests" "@ci:tests"
], ],
"ci:editorconfig:lint": "ec --finder-config ec-cli-config.php",
"ci:json:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q", "ci:json:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
"ci:php": [ "ci:php": [
"@ci:php:cs-fixer", "@ci:php:cs-fixer",
@ -210,6 +212,7 @@
"ci:coverage:merge": "Merges the code coverage reports for unit and functional tests.", "ci:coverage:merge": "Merges the code coverage reports for unit and functional tests.",
"ci:coverage:unit": "Generates the code coverage report for unit tests.", "ci:coverage:unit": "Generates the code coverage report for unit tests.",
"ci:dynamic": "Runs all PHPUnit tests (unit and functional).", "ci:dynamic": "Runs all PHPUnit tests (unit and functional).",
"ci:editorconfig:lint": "Lints files based on editorconfig.",
"ci:json:lint": "Lints the JSON files.", "ci:json:lint": "Lints the JSON files.",
"ci:php": "Runs all static checks for the PHP files.", "ci:php": "Runs all static checks for the PHP files.",
"ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).", "ci:php:cs-fixer": "Checks the code style with the PHP Coding Standards Fixer (PHP-CS-Fixer).",

17
ec-cli-config.php Normal file
View file

@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
use Symfony\Component\Finder\Finder;
$finder = new Finder();
$finder
->in(__DIR__)
->notPath('tools')
->notPath('.Build')
->notPath('var')
->notPath('Documentation-GENERATED-temp')
->notName('phpstan-baseline.neon')
;
return $finder;