martin-helmich / typo3-typoscript-lint

Find coding errors in your TypoScript files.
MIT License
82 stars 19 forks source link

Invalid Checkstyle format on successful linting #185

Closed moritz-ngo closed 7 months ago

moritz-ngo commented 7 months ago

When using Checkstyle output format and the linting was successful, no output will be generated, thus the Checkstyle XML will be invalid

This will be an issue, when piping the output to another command (e.g. cs2pr)
In my pipeline I run smth like this:

typoscript-lint --fail-on-warnings --format=xml --output=- | cs2pr

But this results in an error, because cs2pr requires a valid XML input:

typoscript-lint --fail-on-warnings --format=xml --output=- | cs2pr

Complete without warnings
Error: Expecting xml stream starting with a xml opening tag.

Error: Process completed with exit code 2.
moritz-ngo commented 7 months ago

Awesome, thanks for the quick fix! 🙏🏼