I tend to add a MARK:
comment when I override a protocol implementation, like so:
class SomeLayoutAttributes: UICollectionViewLayoutAttributes {
/// MARK: - NSCopying
override func copyWithZone(zone: NSZone) -> AnyObject {
}
}
Currently, this gives me a Valid Docs Violation. I would say that this is a false negative. Would it make sense to add logic to the rule such that it does not trigger for documentation that includes a MARK
but is not valid documentation?
Hey Lars @larslockefeer ,
As far as I know triple forward-slash are used to describe documentation for the declaration right below.
If you would use double forward-slash MARK you should be fine.
e.g. // MARK: - NSCopying
@freak4pc's recommendation is correct. MARK-style comments should be double-slashed, not triple.
Thanks @freak4pc for the recommendation!
Most helpful comment
Hey Lars @larslockefeer ,
As far as I know triple forward-slash are used to describe documentation for the declaration right below.
If you would use double forward-slash MARK you should be fine.
e.g.
// MARK: - NSCopying