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
Similar to source.lang.swift.expr.array and source.lang.swift.expr.dictionary, SourceKit should provide information about tuples inside a structure. I propose a new expression kind source.lang.swift.expr.tuple.
This would provide key.elements as the other mentioned kinds. Those elements should also provide information about elements names.
This new information would make possible for tools like SwiftLint to evaluate this information.
For SwiftLint in special, this would be useful to improve the Large Tuple Rule, as it currently only evaluates tuples in variable or function declarations. It can't catch cases like using tuples as arguments in generic functions. While it'd probably be possible to implement that in the current state, having SourceKit to provide this information would make it much more reliable.
The text was updated successfully, but these errors were encountered:
I was able to come up with an initial implementation for this, but unfortunately it also removes source.lang.swift.expr.argument from the structure as they apparently are tuples too.
Additional Detail from JIRA
md5: 7aa7f518d7a72cdc9ef2c76883710d77
Issue Description:
Similar to
source.lang.swift.expr.array
andsource.lang.swift.expr.dictionary
, SourceKit should provide information about tuples inside a structure. I propose a new expression kindsource.lang.swift.expr.tuple
.This would provide
key.elements
as the other mentioned kinds. Those elements should also provide information about elements names.This new information would make possible for tools like SwiftLint to evaluate this information.
For SwiftLint in special, this would be useful to improve the Large Tuple Rule, as it currently only evaluates tuples in variable or function declarations. It can't catch cases like using tuples as arguments in generic functions. While it'd probably be possible to implement that in the current state, having SourceKit to provide this information would make it much more reliable.
The text was updated successfully, but these errors were encountered: