martin-helmich / typo3-typoscript-lint

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

Quiet by default #17

Closed mbrodala closed 7 years ago

mbrodala commented 7 years ago

Right now the linter is rather verbose by default, for example if checking an empty file the following output 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\DuplicateAssignmentSniff.
=> Executing sniff Helmich\TypoScriptLint\Linter\Sniff\NestingConsistencySniff.

CHECKSTYLE REPORT

SUMMARY
0 warnings in total.

This makes it rather hard to notice real warnings and messages when checking dozens of files, thus I'd suggest not outputting anything by default unless -v is passed.

A dot progress similar to phpunit could be used instead to indicate activity but this requires support for recursive directory traversal which in turn requires a --pattern option or similar (#19) to cover the myriads of possible file extensions.

martin-helmich commented 7 years ago

Changing the default output format would be a breaking change. I'll probably add a new (non-default) output formatter first, and then maybe change the default output format in an eventual 2.0 release.

mbrodala commented 7 years ago

Personally I don't see a breakage here, unless someone went through the hassle parsing the lint output. What issue do you see here?

martin-helmich commented 7 years ago

Thanks for your input. I've reconsidered my position on this and agree with you. #29 changes the default output to something less verbose. The old behaviour will still be usable, but has to be explicitly enabled via a command-line flag.