martin-helmich / typo3-typoscript-lint

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

Warning for missing whitespace after ">" operator #13

Closed mbrodala closed 7 years ago

mbrodala commented 7 years ago

Given the following snippet:

foo >

The following warning is shown:

Linting input file test.ts.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\IndentationSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\DeadCodeSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\OperatorWhitespaceSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\RepeatingRValueSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\DuplicateAssignmentSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\NestingConsistencySniff.

CHECKSTYLE REPORT
=> test.ts.
   1 Operator should be followed by single space.

SUMMARY
1 warnings in total.

While this makes sense for cases like foo =bar, the case above (object unsetting) should be skipped since trailing whitespace is usually not desired.

mbrodala commented 7 years ago

Thanks for fixing.