// // CheckstyleReporter.swift // SwiftLint // // Created by JP Simard on 12/25/15. // Copyright © 2015 Realm. All rights reserved. // import Foundation public struct CheckstyleReporter: Reporter { public static let identifier = "checkstyle" public static let isRealtime = false public var description: String { return "Reports violations as Checkstyle XML." } public static func generateReport(violations: [StyleViolation]) -> String { var report = "\n" report += violations.map { violation in let fileName = violation.location.file ?? "" return "\n\t\n" + "\t\t\n" + "\t" }.joinWithSeparator("") report += "\n" return report } }