Danny Mösch
Danny Mösch
All changes are contained in 2f0e537.
An observation for this rule in general: The exception for `Bool` seems to be quite arbitrary. What about `var j: Int = 7` or `var d: Double = 1.3` or...
Well, without the explizit types, the variables `j`, `d` and `s` would have the same type as specified. They are the defaults. The current implementation checks exactly for the combinations...
> Although I think your point is a valuable one, I believe it is outside the scope of this PR and so I'd like to suggest the following way forward:...
I'd like to avoid exceptions for certain cases that actually should follow the same rules as others. Breaking changes are acceptable if they really fix an inconstancy or harmonize implementations....
> So, to confirm, you are suggesting that on this PR, the `ignore_booleans` option be renamed to `consider_default_literal_types_redundant`, defaulted to `true`, is that correct? Yes, that's what feels most reasonable...
> And may treating `Int`, `Double` and `String` literals as redundant be added on a separate PR (potentially by someone else), to limit the scope of the change on this...
> @SimplyDanny Thanks again for all the feedback. I investigated adding validations for Int, Double and String literals and determined that an overhaul of the rule, potentially adopting SwiftSyntax, would...
> I do have one question though, which is whether we need to indicate somewhere that `Bool` literals will no longer be considered redundant by default. Since this is a...
Just to let you guys know: I made a few cleanups to reduce some duplications in #5554. Didn't want to prolong the review here while being pedantic. 😅 I also...