Skip to content

Commit

Permalink
use XcodeReporter for StyleViolation's description
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Sep 19, 2015
1 parent ee79209 commit 1bec2bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/SwiftLintFramework/Reporters/XcodeReporter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public struct XcodeReporter: Reporter {
return violations.map(generateForSingleViolation).joinWithSeparator("\n")
}

private static func generateForSingleViolation(violation: StyleViolation) -> String {
internal static func generateForSingleViolation(violation: StyleViolation) -> String {
// {full_path_to_file}{:line}{:character}: {error,warning}: {content}
return "\(violation.location): " +
"\(violation.severity.rawValue.lowercaseString): " +
Expand Down
6 changes: 1 addition & 5 deletions Source/SwiftLintFramework/StyleViolation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ public struct StyleViolation: CustomStringConvertible, Equatable {
public let location: Location
public let reason: String?
public var description: String {
// {full_path_to_file}{:line}{:character}: {error,warning}: {content}
return "\(location): " +
"\(severity.rawValue.lowercaseString): " +
"\(type) Violation: " +
(reason ?? "")
return XcodeReporter.generateForSingleViolation(self)
}

public init(type: StyleViolationType, location: Location, reason: String? = nil) {
Expand Down

0 comments on commit 1bec2bc

Please sign in to comment.