-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add multiline_call_arguments rule
#6223
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
base: main
Are you sure you want to change the base?
Add multiline_call_arguments rule
#6223
Conversation
b6407d6 to
ea7f21b
Compare
Generated by 🚫 Danger |
|
@SimplyDanny One more PR for review :) |
ea7f21b to
6210ddd
Compare
7e8d39b to
9672d83
Compare
9672d83 to
3a4497d
Compare
3a4497d to
20ea825
Compare
20ea825 to
a715d6c
Compare
|
Thanks @GandaLF2006 and sorry for the late response! I think this should a separate rule instead of an option, though. |
Hey. Are you sure about it? |
a715d6c to
ae9bb25
Compare
Yes. Those rules were basically the same. The only difference was the function name being a real name vs. a symbol. Here, we are talking about function declarations vs. function calls. That's totally different syntax elements even though the idea is the same. We might come up with different options for declarations and calls, which we can't separate when both are mixed in the same rule. |
ae9bb25 to
e17d184
Compare
check_calls)multiline_parameters_on_call rule
|
Should this possibly be renamed I'd recommend one of the first two, since it's for arguments being passed to parameters, not just the parameters themselves. Also, the greater the naming difference between the two rules, the less likely people are to mistake them for each other. If you still want to use If you really want the new rule to start with the whole name as ``multiline_parameters |
|
@rgoldberg Good catch. |
|
@SimplyDanny It's done! Please review :) |
e17d184 to
c86e8b2
Compare
multiline_parameters_on_call rulemultiline_call_arguments rule
132c344 to
e1dfb74
Compare
# Conflicts: # Source/SwiftLintBuiltInRules/Rules/RuleConfigurations/MultilineParametersConfiguration.swift
…rguments" This reverts commit 8448a17.
4e534d8 to
af2eb10
Compare
Summary
This PR adds a new opt-in SwiftSyntax rule:
multiline_call_arguments.The rule mirrors the behavior of multiline_parameters for declarations, but applies it to function and method call sites (including Type.foo(...) / Enum.foo(...)), enforcing a consistent multiline formatting style for arguments.