Baseline
+public struct Baseline : Equatable
+
+ A set of violations that can be used to filter newly detected violations.
+ +-
+
-
+ ++
+ + + violations +++ +++ + +++The stored violations.
+ +++Declaration
+++Swift
+
+ +public var violations: [StyleViolation] { get }+ Show on GitHub ++
+ -
+ ++
+ + + init(fromPath:+) ++ +++ + +++Creates a
+ +Baselinefrom a saved file.++Declaration
+++Swift
+
+ +public init(fromPath path: String) throws++Parameters
++ +
++ + ++ ++ fromPath +++ +++The path to read from.
++ Show on GitHub ++
+ -
+ ++
+ + + init(violations:+) ++ +++ + +++Creates a
+ +Baselinefrom a list of violations.++Declaration
+++Swift
+
+ +public init(violations: [StyleViolation])++Parameters
++ +
++ + ++ ++ violations +++ +++The violations for the baseline.
++ Show on GitHub ++
+ -
+ ++
+ + + write(toPath:+) ++ +++ + +++Writes a
+ +Baselineto disk in JSON format.++Declaration
+++Swift
+
+ +public func write(toPath path: String) throws++Parameters
++ +
++ + ++ ++ toPath +++ +++The path to write to.
++ Show on GitHub ++
+ -
+ ++
+ + + filter(_:+) ++ +++ + +++Filters out violations that are present in the
+ +Baseline.Assumes that all violations are from the same file.
+ +++Declaration
+++Swift
+
+ +public func filter(_ violations: [StyleViolation]) -> [StyleViolation]++Parameters
++ +
++ + ++ ++ violations +++ +++The violations to filter.
+++Return Value
+The new violations.
++ Show on GitHub ++
+ -
+ ++
+ + + compare(_:+) ++ +++ + +++Returns the violations that are present in another
+ +Baseline, but not in this one.The violations are filtered using the same algorithm as the
+ +filtermethod above.++Declaration
+++Swift
+
+ +public func compare(_ otherBaseline: Baseline) -> [StyleViolation]++Parameters
++ +
++ + ++ ++ otherBaseline +++ +++The other
+Baseline.+ Show on GitHub ++
+
+ View on GitHub
+
+ Install in Dash
+
+ Baseline Structure Reference
+