You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two separate issues I'm not sure of, if there's a way to bypass or write a custom rule for.
brace-style for one-liner conditions.
Is there any reason this styling isn't considered proper for one-lined conditions?
publicfunc doSomeAction()->Bool{
if !conditionMet {return false }
// More code here ...
// and some more ...
}
The only way to make this work with brace-style would be a new line which seems excessive for such a readable one-liner.
publicfunc doSomeAction()->Bool{
if !conditionMet {return false
}
// More code here ...
// and some more ...
}
colon-whitespace for tabbed styled ivars in a class.
Some parts of my code are written this way for readability sake.
I wanted all types to be in the same "Column", tab-wise.
Unfortunately using the colon-whitespace rule generates warnings about this, and would force me to do something like this, which is much less readable:
Is there any way to write a custom ruling for this, or at least allow something like let var:[spaces]Type instead of a single space? Or would I have to turn off this entire rule, which will prevent actually getting warnings for substantial issues such as let var : Type ?
Thanks for your time on answering this :)
Shai.
The text was updated successfully, but these errors were encountered:
There are two separate issues I'm not sure of, if there's a way to bypass or write a custom rule for.
brace-style
for one-liner conditions.Is there any reason this styling isn't considered proper for one-lined conditions?
The only way to make this work with
brace-style
would be a new line which seems excessive for such a readable one-liner.colon-whitespace
for tabbed styled ivars in a class.Some parts of my code are written this way for readability sake.
I wanted all types to be in the same "Column", tab-wise.
Unfortunately using the
colon-whitespace
rule generates warnings about this, and would force me to do something like this, which is much less readable:Is there any way to write a custom ruling for this, or at least allow something like
let var:[spaces]Type
instead of a single space? Or would I have to turn off this entire rule, which will prevent actually getting warnings for substantial issues such aslet var : Type
?Thanks for your time on answering this :)
Shai.
The text was updated successfully, but these errors were encountered: