mirror of
https://github.com/nicklockwood/SwiftFormat.git
synced 2026-05-17 10:30:35 +00:00
26 lines
650 B
Swift
26 lines
650 B
Swift
//
|
|
// SortedImports.swift
|
|
// SwiftFormat
|
|
//
|
|
// Created by Pablo Carcelén on 11/22/17.
|
|
// Copyright © 2024 Nick Lockwood. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public extension FormatRule {
|
|
/// Deprecated
|
|
static let sortedImports = FormatRule(
|
|
help: "Sort import statements alphabetically.",
|
|
deprecationMessage: "Use sortImports instead.",
|
|
options: ["import-grouping"],
|
|
sharedOptions: ["linebreaks"]
|
|
) { formatter in
|
|
_ = formatter.options.importGrouping
|
|
_ = formatter.options.linebreak
|
|
FormatRule.sortImports.apply(with: formatter)
|
|
} examples: {
|
|
nil
|
|
}
|
|
}
|