pluswerk / grumphp-typoscript-task
Connects the TypoScript linter from Martin Helmich with grumphp and adds some sniffer.
Installs: 2 743
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=7.2.0
- helmich/typo3-typoscript-lint: ^2.0
- phpro/grumphp: ^0.16.2
- typo3/minimal: ^9.5
Requires (Dev)
- dg/bypass-finals: ^1.1
- phpunit/phpunit: ^8.4
- pluswerk/grumphp-config: ^3.0
This package is auto-updated.
Last update: 2024-10-27 02:04:33 UTC
README
grumphp-typoscript-task
GrumPHP task to lint TYPO3 CMS TypoScript files.
This package adds a TYPO3 CMS TypoScript file linter task to grumphp based on martin-helmich/typo3-typoscript-lint of Martin Helmich.
Quick guide
grumphp.yml
Basic inclusion in grumphp.yml:
parameters: tasks: typoscriptlint: ~ extensions: - Pluswerk\TypoScriptLinter\ExtensionLoader
Composer
composer require --dev pluswerk/grumphp-typoscript-task
Configuration
typoscript linter
The linter can be configured in the grumphp.yml file in the same way as without grumphp see TypoScript Linter configuration
Example:
parameters: tasks: typoscriptlint: sniffs: - class: Indentation parameters: useSpaces: true indentPerLevel: 2 indentConditions: true - class: DeadCode extensions: - Pluswerk\TypoScriptLinter\ExtensionLoader
triggered_by
The file extensions, which trigger the linter.
parameters: tasks: typoscriptlint: triggered_by: - 'typoscript'
ignore_patterns
Ignore file with grumphp ignore patterns.
parameters: tasks: typoscriptlint: ignore_patterns: - 'pattern'