Skip to content

Commit a2acc60

Browse files
authored
Merge pull request #937 from alexandersandberg/patch-1
Fix documentation typos
2 parents fb63404 + 8ddedcf commit a2acc60

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Documentation/Configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ top-level keys and values:
113113
### `prioritizeKeepingFunctionOutputTogether`
114114
**type:** boolean
115115

116-
**description:** Determines if function-like declaration outputs should be prioritized to be together with thefunction signature right (closing) parenthesis. If `false`, function output (i.e. throws, return type) is not prioritized to be together with the signature's right parenthesis, and when the line length would be exceeded,a line break will be fired after the function signature first, indenting the declaration output one additional level. If true, A line break will be fired further up in the function's declaration (e.g. generic parameters, parameters) before breaking on the function's output.
116+
**description:** Determines if function-like declaration outputs should be prioritized to be together with the function signature's right (closing) parenthesis. If `false`, function output (i.e. throws, return type) is not prioritized to be together with the signature's right parenthesis, and when the line length would be exceeded, a line break will be fired after the function signature first, indenting the declaration output one additional level. If true, a line break will be fired further up in the function's declaration (e.g. generic parameters, parameters) before breaking on the function's output.
117117

118118
**default:** `false`
119119

@@ -186,7 +186,7 @@ switch someValue {
186186
### `noAssignmentInExpressions`
187187
**type:** object
188188

189-
**description:** Assignment expressions must be their own statements. Assignment should not be used in an expression context that expects a `Void` value. For example, assigning a variable within a `return` statement existing a `Void` function is prohibited.
189+
**description:** Assignment expressions must be their own statements. Assignment should not be used in an expression context that expects a `Void` value. For example, assigning a variable within a `return` statement exiting a `Void` function is prohibited.
190190

191191
- `allowedFunctions` _(strings array)_: A list of function names where assignments are allowed to be embedded in expressions that are passed as parameters to that function.
192192

@@ -221,7 +221,7 @@ a hard line break
221221
will be formatted as:
222222
```swift
223223
"""
224-
an esacpe\
224+
an escape\
225225
line break
226226
a hard \
227227
line break

Documentation/RuleDocumentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ Format: The access level is removed from the extension declaration and is added
243243
Assignment expressions must be their own statements.
244244

245245
Assignment should not be used in an expression context that expects a `Void` value. For example,
246-
assigning a variable within a `return` statement existing a `Void` function is prohibited.
246+
assigning a variable within a `return` statement exiting a `Void` function is prohibited.
247247

248248
Lint: If an assignment expression is found in a position other than a standalone statement, a
249249
lint finding is emitted.

Sources/SwiftFormat/API/Configuration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ public struct Configuration: Codable, Equatable {
122122
public var lineBreakBetweenDeclarationAttributes: Bool
123123

124124
/// Determines if function-like declaration outputs should be prioritized to be together with the
125-
/// function signature right (closing) parenthesis.
125+
/// function signature's right (closing) parenthesis.
126126
///
127127
/// If false (the default), function output (i.e. throws, return type) is not prioritized to be
128128
/// together with the signature's right parenthesis, and when the line length would be exceeded,
129129
/// a line break will be fired after the function signature first, indenting the declaration output
130-
/// one additional level. If true, A line break will be fired further up in the function's
130+
/// one additional level. If true, a line break will be fired further up in the function's
131131
/// declaration (e.g. generic parameters, parameters) before breaking on the function's output.
132132
public var prioritizeKeepingFunctionOutputTogether: Bool
133133

@@ -211,7 +211,7 @@ public struct Configuration: Codable, Equatable {
211211
/// will be formatted as:
212212
/// ```swift
213213
/// """
214-
/// an esacpe\
214+
/// an escape\
215215
/// line break
216216
/// a hard \
217217
/// line break

Sources/SwiftFormat/Rules/NoAssignmentInExpressions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import SwiftSyntax
1515
/// Assignment expressions must be their own statements.
1616
///
1717
/// Assignment should not be used in an expression context that expects a `Void` value. For example,
18-
/// assigning a variable within a `return` statement existing a `Void` function is prohibited.
18+
/// assigning a variable within a `return` statement exiting a `Void` function is prohibited.
1919
///
2020
/// Lint: If an assignment expression is found in a position other than a standalone statement, a
2121
/// lint finding is emitted.

0 commit comments

Comments
 (0)