Open defagos opened 1 month ago
Unfortunately, this is impossible to detect on a syntax-level only. To analyse that correctly, full type information is necessary on the call site about the object that's called. So this is a false positive we have to accept.
Thanks for the feedback. Feel free to close this issue.
Thanks for the feedback. Feel free to close this issue.
It's still a bug. Maybe one day there's a new way to support this in the tool. Then we may want to revisit all so far "acceptable false positives".
New Issue Checklist
Describe the bug
With changes made between SwiftLint 0.54.0 and 0.55.1 the
trailing_closure
rule now enforces a practice that the Swift compiler considers as deprecated.Consider a function (or method) whose signature involves several trailing closures with default arguments, like:
Swift 5.8 introduced changes which lead to a warning being reported when calling the above function as follows:
When fixing the code to silence the Xcode warning:
SwiftLint 0.55.1 reports a warning. This was not the case with SwiftLint 0.54.0.
Complete output when running SwiftLint, including the stack trace and command used
Environment
swiftlint version
to be sure)? 0.55.1xcodebuild -version
)? 15.4 (15F31c)