Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration to trailing_closure to enable/disable properties #1718

Closed
marcelofabri opened this issue Jul 27, 2017 · 3 comments
Closed
Labels
enhancement Ideas for improvements of existing features and rules. wontfix Issues that became stale and were auto-closed by a bot.

Comments

@marcelofabri
Copy link
Collaborator

From #1193 (comment):


Even as opt-in I think it needs work. For example, I wouldn't consider accessing the property after a call to a closure to require it to use trailing closure syntax, such as the first OSSCheck violation reported here:

XCTAssertEqual(1, schema.objectSchema.filter({ $0.className == "SwiftStringObject" }).count)
@marcelofabri marcelofabri added the enhancement Ideas for improvements of existing features and rules. label Jul 27, 2017
@jshier
Copy link
Contributor

jshier commented Sep 11, 2017

In addition to this configuration, it would be nice to disable for empty closures. For instance, WKAlertAction requires a handler, but using trailing closure syntax with it seems weird.
This:

WKAlertAction(title: "Title",
              style: .cancel,
              handler: { })

vs.

WKAlertAction(title: "Title",
              style: .cancel) { }

@weakfl
Copy link

weakfl commented May 16, 2019

Any update?

@stale
Copy link

stale bot commented Nov 8, 2020

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

@stale stale bot added the wontfix Issues that became stale and were auto-closed by a bot. label Nov 8, 2020
@stale stale bot closed this as completed Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules. wontfix Issues that became stale and were auto-closed by a bot.
Projects
None yet
Development

No branches or pull requests

3 participants