Skip to content

Commit 7e16beb

Browse files
authored
Merge branch 'master' into argumentparser
2 parents 2788496 + ee75427 commit 7e16beb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ build `swift-format` using the following commands:
3333

3434
```
3535
git clone -b swift-5.1-branch https://github.com/apple/swift-format.git
36+
cd swift-format
3637
swift build
3738
```
3839

Sources/swift-format/Run.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ func formatMain(
7676
configuration: Configuration, sourceFile: FileHandle, assumingFilename: String?, inPlace: Bool,
7777
debugOptions: DebugOptions, diagnosticEngine: DiagnosticEngine
7878
) {
79+
// Even though `diagnosticEngine` is defined, it's use is reserved for fatal messages. Pass nil
80+
// to the formatter to suppress other messages since they will be fixed or can't be automatically
81+
// fixed anyway.
7982
let formatter = SwiftFormatter(configuration: configuration, diagnosticEngine: nil)
8083
formatter.debugOptions = debugOptions
8184
let assumingFileURL = URL(fileURLWithPath: assumingFilename ?? "<stdin>")

0 commit comments

Comments
 (0)