Closed calda closed 2 years ago
seems like it thinks the <
and >
tokens are generic parameters on a type named previousScrollOffsetY
This popped up when we enabled the andOperators
rule. Previously it was written like this, which didn't cause any issues:
if
previousScrollOffsetY < scrollView.contentOffset.y
&& (scrollView.contentOffset.y + scrollView.bounds.size.height) > (threshold * scrollView.contentSize.height)
{
/...
}
Thanks - I think your diagnosis is correct. I'll fix it asap.
@calda fixed in 0.49.15
We've ran in to an interesting issue where running SwiftFormat (e.g. just
swiftformat . --indent 2
) on the following code causes it to no longer compile:Before
After (
swiftformat . --indent 2
)which no longer compilers.
Not sure exactly what is causing this, but I was able to work around it by wrapping this block in
// swiftformat:disable:all
and// swiftformat:enable:all
comments.