Skip to content

Commit 36173f4

Browse files
committed
Add includeConditionalImports docs to OrderedImports.swift
1 parent bd92458 commit 36173f4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Documentation/RuleDocumentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ The order of the import groups is 1) regular imports, 2) declaration imports, 3)
411411
imports, and 4) @testable imports. These groups are separated by a single blank line. Blank lines in
412412
between the import declarations are removed.
413413

414-
By default, imports within conditional compilation blocks (`#if`, `#elseif`, `#else`) are not ordered. This behavior can be controlled via the `orderedImports.includeConditionalImports`
415-
configuration option.
414+
By default, imports within conditional compilation blocks (`#if`, `#elseif`, `#else`) are not ordered.
415+
This behavior can be controlled via the `orderedImports.includeConditionalImports` configuration option.
416416

417417
Lint: If an import appears anywhere other than the beginning of the file it resides in,
418418
not lexicographically ordered, or not in the appropriate import group, a lint error is

Sources/SwiftFormat/Rules/OrderedImports.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ import SwiftSyntax
1717
/// imports, and 4) @testable imports. These groups are separated by a single blank line. Blank lines in
1818
/// between the import declarations are removed.
1919
///
20+
/// By default, imports within conditional compilation blocks (`#if`, `#elseif`, `#else`) are not ordered.
21+
/// This behavior can be controlled via the `orderedImports.includeConditionalImports` configuration option.
22+
///
2023
/// Lint: If an import appears anywhere other than the beginning of the file it resides in,
2124
/// not lexicographically ordered, or not in the appropriate import group, a lint error is
2225
/// raised.

0 commit comments

Comments
 (0)