Closed Cyberbeni closed 3 years ago
@Cyberbeni is this on 0.48.14? I'm not able to reproduce with the code sample provided. In fact the
// swiftformat:disable:next redundantSelf
Isn't even needed, since self.min
, self.max
, etc are now ignored by default.
@Cyberbeni ah wait, I see the problem. It only happens if --swiftversion
is set to 5.4 or above.
Yes, only when specifying --swiftversion 5.4 or 5.5
There is another case where there is a .swiftversion file 2 folders up (but the command has 5.5 specified because only a small part of the code needs to be 3.0 compatible) and a self. is removed causing a compilation error.
I assume this is the same issue or should I try to get a smaller code chunk that reproduces it / open a separate issue?
@Cyberbeni sounds like a different issue, so it's worth having a separate snippet.
Yes, it seems like a different issue -> https://github.com/nicklockwood/SwiftFormat/issues/1032
@Cyberbeni fixed in 0.48.15
I am currently upgrading from 0.48.11
self is removed here, causing a compiler warning that I can also use Swift.max and simd.max and if I want Sequence's max, I should explicitly use self.max
edit: using
// swiftformat:disable all
also doesn't seem to prevent formatting