Skip to content

Commit f97a825

Browse files
Update Source/swiftlint/Helpers/LintOrAnalyzeCommand.swift
Co-authored-by: Danny Mösch <[email protected]>
1 parent ad9d563 commit f97a825

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/swiftlint/Helpers/LintOrAnalyzeCommand.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ struct LintOrAnalyzeCommand {
4444
private static func lintOrAnalyze(_ options: LintOrAnalyzeOptions) async throws {
4545
let builder = LintOrAnalyzeResultBuilder(options)
4646
let files = try await collectViolations(builder: builder)
47-
let baselineOutputPath = options.writeBaseline ?? builder.configuration.writeBaseline
48-
if let baselineOutputPath {
47+
if let baselineOutputPath = options.writeBaseline ?? builder.configuration.writeBaseline {
4948
try Baseline(violations: builder.unfilteredViolations).write(toPath: baselineOutputPath)
5049
}
5150
try Signposts.record(name: "LintOrAnalyzeCommand.PostProcessViolations") {

0 commit comments

Comments
 (0)