martin-helmich / typo3-typoscript-lint

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

Ignore empty lines when checking indentation #117

Closed martin-helmich closed 3 years ago

martin-helmich commented 3 years ago

This fixes a regression caused by a change in a dependency (martin-helmich/typo3-typoscript-parser#61). That change made empty statements (read: empty lines) turn up in the token stream (which was on purpose, since it actually allows more insight into how the code was originally formatted before lexical analysis). Unfortunately, that messed up the IndentationSniff, which now also expected these empty lines to have indentation.

This change modifies the IndentationSniff to explicitly exclude empty lines from analysis.

Fixes #115