   sourceFiles.append(sourceFile)
 }
 
-let driver = Driver(ruleIdentifiers: enabledRules, reportType: reportType)
+let driver = Driver(
+  ruleIdentifiers: enabledRules,
+  reportType: reportType,
+  outputHandle: outputHandle)
 let exitCode = driver.lint(sourceFiles: sourceFiles, ruleConfigurations: ruleConfigurations)
 exit(exitCode.rawValue)

    }
}

let reportType = readOption("report-type") ?? "text"

let filePaths = cliArgs
var sourceFiles = [SourceFile]()

}

func readOption(_ option: String) -> String? {
  guard let argIndex = cliArgs.index(of: "-\(option)") else {
    return nil
  }

