Skip to content

[SR-6116] [SourceKit] Introduce "source.lang.swift.expr.closure" in structure #48671

Closed
@marcelofabri

Description

@marcelofabri
Previous ID SR-6116
Radar None
Original Reporter @marcelofabri
Type New Feature
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels New Feature
Assignee @marcelofabri
Priority Medium

md5: 328c664880b57a88af33aa16267d132f

Issue Description:

It'd be useful for tools like SwiftLint to get information about closure expressions in source code.

Several rules currently need this information and obtain it using heuristics. It'd be way more reliable if this was available via SourceKit.

Some rules that could use it:

It'd be also useful to know whether a closure is a trailing closure inside a function call, but I'm not sure if it's semantically correct to add this information on this structure, because it's something available in several declarations such as CallExpr and SubscriptExpr, not ClosureExpr.

Metadata

Metadata

Assignees

Labels

closuresFeature: closuresdocument structureArea → source tooling: document structure annotationfeatureA feature request or implementationsource toolingArea: IDE support, SourceKit, and other source tooling

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions