We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dd87cc2 + 5e62d56 commit fc3fab6Copy full SHA for fc3fab6
Sources/swift-format/Frontend/LintFrontend.swift
@@ -39,6 +39,10 @@ class LintFrontend: Frontend {
39
.error, "Unable to lint \(path): file is not readable or does not exist."))
40
return
41
} catch SwiftFormatError.fileContainsInvalidSyntax(let position) {
42
+ guard !lintFormatOptions.ignoreUnparsableFiles else {
43
+ // The caller wants to silently ignore this error.
44
+ return
45
+ }
46
let location = SourceLocationConverter(file: path, source: source).location(for: position)
47
diagnosticEngine.diagnose(
48
Diagnostic.Message(.error, "file contains invalid or unrecognized Swift syntax."),
0 commit comments