Skip to content

Commit eac7827

Browse files
committed
Various stylistic and whitespace fixes
1 parent f0717e5 commit eac7827

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

proposals/testing/0013-issue-severity-warning.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ The `Severity` enum:
4949
```swift
5050
extension Issue {
5151
// ...
52+
5253
public enum Severity: Codable, Comparable, CustomStringConvertible, Sendable {
5354
/// The severity level for an issue which should be noted but is not
5455
/// necessarily an error.
@@ -63,7 +64,6 @@ extension Issue {
6364
/// marked as a failure.
6465
case error
6566
}
66-
// ...
6767
}
6868
```
6969

@@ -78,6 +78,9 @@ Issue.record("My comment", severity: .warning)
7878
Here is the `Issue.record` method definition with severity as a parameter.
7979

8080
```swift
81+
extension Issue {
82+
// ...
83+
8184
/// Record an issue when a running test and an issue occurs.
8285
///
8386
/// - Parameters:
@@ -96,8 +99,7 @@ Here is the `Issue.record` method definition with severity as a parameter.
9699
severity: Severity = .error,
97100
sourceLocation: SourceLocation = #_sourceLocation
98101
) -> Self
99-
100-
// ...
102+
}
101103
```
102104

103105
### Issue Type Enhancements
@@ -107,13 +109,11 @@ The Issue type is enhanced with two new properties to better handle and report i
107109
- `severity`: This property allows access to the specific severity level of an issue, enabling more precise handling of test results.
108110

109111
```swift
110-
// ...
111-
112112
extension Issue {
113+
// ...
113114

114-
/// The severity of the issue.
115-
public var severity: Severity { get set }
116-
115+
/// The severity of the issue.
116+
public var severity: Severity { get set }
117117
}
118118

119119
```
@@ -141,11 +141,10 @@ extension Issue {
141141
Example usage of `severity` and `isFailure`:
142142

143143
```swift
144-
// ...
145144
withKnownIssue {
146145
// ...
147146
} matching: { issue in
148-
return issue.isFailure || issue.severity > .warning
147+
issue.isFailure || issue.severity > .warning
149148
}
150149
```
151150

0 commit comments

Comments
 (0)