Skip to content

New rule: sorted_collection_members - #6921

Draft
ZevEisenberg wants to merge 7 commits into
realm:mainfrom
ZevEisenberg:sorted-collection-members-rule
Draft

ZevEisenberg wants to merge 7 commits into
realm:mainfrom
ZevEisenberg:sorted-collection-members-rule

Conversation

@ZevEisenberg

@ZevEisenberg ZevEisenberg commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

I've got some more work I want to do in order to polish this up, but I wanted to get some early feedback on whether a rule like this would be accepted.

A couple of questions:

  • what would be the right syntax for a one-off enable or disable on a collection literal?
  • I didn't make it a correctable rule, because I didn't want to have to deal with preserving comments that may be interspersed. But it could probably be added, as long as the rule is either "can't autocorrect if there are interspersed comments" or "any comment lines stay stuck to the collection member that they are above."

Motivating use case: we have some arrays in our code, particularly in Package.swift, that look like this:

let package = Package(
  name: "Packages",
  platforms: [
    ...
  ],
  products: [
    ...
  ],
  dependencies: [
    ...
  ],
  targets: [
    // Please keep this array alphabetized!

    .target(
      name: "ACoolFeature",
      dependencies: [
        ...
      ]
    ),
    .target(
      name: "AnotherCoolFeature",
      dependencies: [
        ...
      ]
    ),
    ...
  ]
)

Instead of imploring future developers to keep a collection literal's members alphabetized, I'd like to propose an opt-in rule that can keep us honest:

// enable it once for a file or declaration, but you'd probably never want it enabled app-wide.

// swiftlint:enable sorted_collection_members
let package = Package(
  name: "Packages",
  platforms: [ // swiftlint:disable:this sorted_collection_members
    // enable or disable it ad-hoc if you need to
    ...
  ],
  products: [
    ...
  ],
  dependencies: [
    ...
  ],
  targets: [
    .target(
      name: "ACoolFeature",
      dependencies: [
        ...
      ]
    ),
    .target(
      name: "AnotherCoolFeature",
      dependencies: [
        ...
      ]
    ),
    ...
  ]
)
// swiftlint:disable sorted_collection_members

@ZevEisenberg
ZevEisenberg force-pushed the sorted-collection-members-rule branch 2 times, most recently from 285c2ca to 0a412a4 Compare September 24, 2026 21:45
@ZevEisenberg

Copy link
Copy Markdown
Contributor Author

Here's one possible weakness with this approach: it appears that, if a rule is disabled or not-opted-in globally, it cannot be enabled with swiftlint:enable:this sorted_collection_members on a per-literal basis. Does this sound right, and if so, is it something you'd be willing to entertain a PR to change?

@ZevEisenberg

ZevEisenberg commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

If that's too drastic a change for this repo, I was able to get something similar working in SwiftFormat, so I may just go with that. I'll leave this PR open until I hear from a maintainer, though.

@ZevEisenberg
ZevEisenberg force-pushed the sorted-collection-members-rule branch from 0a412a4 to 7f11d34 Compare September 28, 2026 16:51
@SwiftLintBot

Copy link
Copy Markdown
19794 Warnings
⚠️ If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/CompanionCacheViewController.swift:23:19: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/BrightnessViewController.swift:68:16: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/BrightnessViewController.swift:90:14: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/FiltersViewController.swift:76:57: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/AdvancedViewController.swift:263:54: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/AdvancedViewController.swift:278:39: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsVideos.swift:143:58: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Prefs/PrefsInfo.swift:197:45: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:45:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:51:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:106:14: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:114:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:296:28: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/TimeManagement.swift:302:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Sidebar.swift:34:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Sidebar.swift:38:13: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Sidebar.swift:39:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:27:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:84:14: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:91:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:125:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:135:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:142:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:173:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:198:9: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceInfo.swift:258:13: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Aerial.swift:76:67: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/Forecast.swift:122:33: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Downloads/AsynchronousOperation.swift:59:13: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/OneCall.swift:152:33: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:32:34: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:52:34: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:62:34: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/SourceList.swift:94:43: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:247:60: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:327:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:337:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Sources/Source.swift:359:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/API/OpenWeather.swift:118:33: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:38:41: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:141:44: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:143:43: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCommonView.swift:209:17: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:79:60: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCountdownView.swift:36:56: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoCountdownView.swift:37:59: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimatableLayer.swift:218:39: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimatableLayer.swift:221:13: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationTextLayer.swift:155:56: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationTextLayer.swift:156:53: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:960:36: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Package@swift-6.2.swift:29:35: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Package@swift-6.0.swift:29:35: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/ParameterEncoder.swift:133:37: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/ParameterEncoding.swift:75:37: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/Response.swift:430:88: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/HTTPHeaders.swift:361:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/HTTPHeaders.swift:363:14: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/Request.swift:1087:82: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/Session.swift:1317:36: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Core/Session.swift:1325:36: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Features/RequestCompression.swift:108:28: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Source/Features/ServerTrustEvaluation.swift:475:37: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/InternalRequestTests.swift:75:46: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:97:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:136:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:255:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:276:13: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:329:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:369:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:485:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:526:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:600:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ValidationTests.swift:698:23: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestInterceptorTests.swift:566:46: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:65:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:109:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:160:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:216:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:263:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:330:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:331:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:405:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:406:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:474:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:534:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:562:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:593:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:640:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:681:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:723:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:759:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:798:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:838:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:879:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:969:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1016:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1067:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1145:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1146:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1219:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1220:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1261:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DataStreamTests.swift:1325:47: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/DownloadTests.swift:396:51: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:76:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:108:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:140:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:201:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:253:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1071:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1095:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1119:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1146:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1191:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1217:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1230:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1244:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1262:46: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1278:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1290:46: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1331:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1382:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1401:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1678:25: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1709:25: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1744:39: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/RequestTests.swift:1752:38: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:90:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:168:43: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:419:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:486:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:501:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:517:27: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:550:42: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ParameterEncodingTests.swift:572:22: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:1763:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:1811:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:1859:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:1904:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/SessionTests.swift:1950:20: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/ProtectedTests.swift:88:28: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/HTTPHeadersTests.swift:31:58: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/HTTPHeadersTests.swift:32:50: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/HTTPHeadersTests.swift:33:53: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/HTTPHeadersTests.swift:36:45: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ This PR introduced a violation in Alamofire: /Tests/HTTPHeadersTests.swift:54:58: Warning: Please keep the elements of this collection literal sorted (sorted_collection_members)
⚠️ Danger found 19794 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 148.
20 Messages
📖 Building this branch resulted in a binary size of 28820.71 KiB vs 28755.54 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.67 s vs 0.68 s on main (1% faster).
📖 Linting Alamofire with this PR took 0.97 s vs 0.98 s on main (1% faster).
📖 Linting Brave with this PR took 5.52 s vs 5.5 s on main (0% slower).
📖 Linting Brigade with this PR took 18.26 s vs 18.27 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 31.63 s vs 31.43 s on main (0% slower).
📖 Linting Firefox with this PR took 11.7 s vs 11.59 s on main (0% slower).
📖 Linting Kickstarter with this PR took 7.44 s vs 7.4 s on main (0% slower).
📖 Linting Moya with this PR took 0.38 s vs 0.37 s on main (2% slower).
📖 Linting NetNewsWire with this PR took 2.59 s vs 2.59 s on main (0% slower).
📖 Linting Nimble with this PR took 0.56 s vs 0.56 s on main (0% slower).
📖 Linting PocketCasts with this PR took 7.42 s vs 7.44 s on main (0% faster).
📖 Linting Quick with this PR took 0.37 s vs 0.36 s on main (2% slower).
📖 Linting Realm with this PR took 3.0 s vs 2.97 s on main (1% slower).
📖 Linting Sourcery with this PR took 1.64 s vs 1.65 s on main (0% faster).
📖 Linting Swift with this PR took 4.55 s vs 4.52 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.18 s vs 0.18 s on main (0% slower).
📖 Linting VLC with this PR took 1.45 s vs 1.44 s on main (0% slower).
📖 Linting Wire with this PR took 16.45 s vs 16.35 s on main (0% slower).
📖 Linting WordPress with this PR took 10.67 s vs 10.65 s on main (0% slower).

Here's an example of your CHANGELOG entry:

* New rule: sorted_collection_members.  
  [ZevEisenberg](https://github.com/ZevEisenberg)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants