-
Notifications
You must be signed in to change notification settings - Fork 887
Conversation
Thanks for your interest in palantir/tslint, @alexeagle! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
palantir@8fd8723 introduced a change where the proseFormatter writes a single newline to stdout when there are no failures
Wanted to note that there's been some discussion on this before: #1463 (comment) @caugner was of the opinion that a newline should be written when there are no failures |
@@ -20,6 +20,10 @@ import {RuleFailure} from "../language/rule/rule"; | |||
|
|||
export class Formatter extends AbstractFormatter { | |||
public format(failures: RuleFailure[]): string { | |||
if (!failures.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TSLint norms is to do an explicit comparison, (failures.length === 0)
.
Just curious, do you have that feature enabled that lets TSLint maintainers make modifications to your PR branch? I haven't gotten a chance to try it out yet, and something like this is the ideal scenario
However, I'm leaning towards agreeing with you @alexeagle. Obviously, some formatters will always have output - for example, a JSON formatter would always output |
The reason I found this is that we have some internal tests for our tslint integration. We assert on the exit code by sensing whether there is any output, this way we don't need some other golden file saying what the exit code should be. |
Allow edits from maintainers. is checked - so give that a try? |
Hmm, can't get it working for some reason. I'm going to try again tomorrow, but if I can't figure it out I'll merge this, no need for any changes on your end |
) Addresses review #875140 in PR palantir#1558 for compatibility with discussion item palantir#1553
8fd8723 introduced a change
where the proseFormatter writes a single newline to stdout when there are no failures