Skip to content

Commit

Permalink
Merge pull request realm#4653 from realm/jp-remove-swiftlint-valid-docs
Browse files Browse the repository at this point in the history
remove SwiftLint commands to disable valid docs rule
  • Loading branch information
jpsim authored Feb 9, 2017
2 parents d4905bb + 16b5af8 commit 46ee1d0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions RealmSwift/Error.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extension Realm.Error: _BridgedStoredNSError {
extension Realm.Error: Equatable {}

/// Returns a Boolean indicating whether the errors are identical.
public func == (lhs: Error, rhs: Error) -> Bool { // swiftlint:disable:this valid_docs
public func == (lhs: Error, rhs: Error) -> Bool {
return lhs._code == rhs._code
&& lhs._domain == rhs._domain
}
Expand All @@ -107,6 +107,6 @@ public func == (lhs: Error, rhs: Error) -> Bool { // swiftlint:disable:this vali
Pattern matching matching for `Realm.Error`, so that the instances can be used with Swift's
`do { ... } catch { ... }` syntax.
*/
public func ~= (lhs: Realm.Error, rhs: Error) -> Bool { // swiftlint:disable:this valid_docs
public func ~= (lhs: Realm.Error, rhs: Error) -> Bool {
return lhs == rhs
}
2 changes: 1 addition & 1 deletion RealmSwift/ObjectSchema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public final class ObjectSchema: CustomStringConvertible {

extension ObjectSchema: Equatable {
/// Returns whether the two object schemas are equal.
public static func == (lhs: ObjectSchema, rhs: ObjectSchema) -> Bool { // swiftlint:disable:this valid_docs
public static func == (lhs: ObjectSchema, rhs: ObjectSchema) -> Bool {
return lhs.rlmObjectSchema.isEqual(to: rhs.rlmObjectSchema)
}
}
2 changes: 1 addition & 1 deletion RealmSwift/Property.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public final class Property: CustomStringConvertible {

extension Property: Equatable {
/// Returns whether the two properties are equal.
public static func == (lhs: Property, rhs: Property) -> Bool { // swiftlint:disable:this valid_docs
public static func == (lhs: Property, rhs: Property) -> Bool {
return lhs.rlmProperty.isEqual(to: rhs.rlmProperty)
}
}
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/Realm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public final class Realm {

extension Realm: Equatable {
/// Returns whether two `Realm` isntances are equal.
public static func == (lhs: Realm, rhs: Realm) -> Bool { // swiftlint:disable:this valid_docs
public static func == (lhs: Realm, rhs: Realm) -> Bool {
return lhs.rlmRealm == rhs.rlmRealm
}
}
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/RealmCollection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public final class RLMIterator<T: Object>: IteratorProtocol {
}

/// Advance to the next element and return it, or `nil` if no next element exists.
public func next() -> T? { // swiftlint:disable:this valid_docs
public func next() -> T? {
let accessor = unsafeBitCast(generatorBase.next() as! Object?, to: Optional<T>.self)
if let accessor = accessor {
RLMInitializeSwiftAccessorGenerics(accessor)
Expand Down
2 changes: 1 addition & 1 deletion RealmSwift/Schema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public final class Schema: CustomStringConvertible {

extension Schema: Equatable {
/// Returns whether the two schemas are equal.
public static func == (lhs: Schema, rhs: Schema) -> Bool { // swiftlint:disable:this valid_docs
public static func == (lhs: Schema, rhs: Schema) -> Bool {
return lhs.rlmSchema.isEqual(to: rhs.rlmSchema)
}
}
1 change: 0 additions & 1 deletion RealmSwift/SortDescriptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ extension SortDescriptor: CustomStringConvertible {
extension SortDescriptor: Equatable {
/// Returns whether the two sort descriptors are equal.
public static func == (lhs: SortDescriptor, rhs: SortDescriptor) -> Bool {
// swiftlint:disable:previous valid_docs
return lhs.keyPath == rhs.keyPath &&
lhs.ascending == lhs.ascending
}
Expand Down

0 comments on commit 46ee1d0

Please sign in to comment.