diff --git a/README.md b/README.md index 92ca4e0f..bf07c33d 100644 --- a/README.md +++ b/README.md @@ -1086,6 +1086,8 @@ Known issues * The `propertyTypes` rule can cause a build failure in cases like `let foo = Foo.bar` where the value is a static member that doesn't return the same time. For example, `let foo: Foo = .bar` would be invalid if the `bar` property was defined as `static var bar: Bar`. As a workaround you can write the name of the type explicitly, like `let foo: Bar = Foo.bar`, or exclude the type name and/or property name with `--preserve-symbols Bar,bar,etc`. +* The `propertyTypes` rule can cause a build failure in cases like `let value = Tools.makeString()` where `Tools` is used as a namespace (e.g. a caseless enum) and `makeString()` is a static factory method that returns a different type (e.g. `String`). The rule converts this to `let value: Tools = .makeString()`, which fails to compile. As a workaround you can write the type explicitly, like `let value: String = Tools.makeString()`, or exclude the type name and/or property name with `--preserve-symbols Tools,makeString,etc`, or use `// swiftformat:disable:next propertyTypes`. + * The `redundantEquatable` rule may incorrectly remove a `==` implementation that intentionally overrides a default `==` provided by another protocol. For example, `Strideable` provides a default `==` implementation derived from `distance(to:)`, and a type may override it with a custom `==`. SwiftFormat handles this case when the `Strideable` conformance is defined in the same file, but it cannot detect conformances in a different file, nor default `==` implementations provided by other protocols. As a workaround you can use the `// swiftformat:disable:next redundantEquatable` comment directive to disable the rule for the affected type (or just disable the `redundantEquatable` rule completely).