mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
ea311bab23
By using SourceKit's `index` request to index the entire source file, we can avoid having to make `cursor-info` requests for every candidate token in the file, which scales linearly with the number of candiate tokens. For the Yams project, this approach improved the total SwiftLint run time by 4.6x: 7.9 down from 36.8s. The SourceKit index response doesn't have everything we need to identify declarations, so we still need to make some `cursor-info` requests, mostly to detect overrides: protocol conformances and parent class overrides. This approach ends up finding more unused declarations because the index contains more declared USRs than can be found by calling `cursor-info` on candidate tokens in a file. --- Remove unused declaration in ArrayInitRule --- Update package versions