Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False negative in valid_docs rules #744

Closed
larslockefeer opened this issue Aug 8, 2016 · 3 comments
Closed

False negative in valid_docs rules #744

larslockefeer opened this issue Aug 8, 2016 · 3 comments

Comments

@larslockefeer
Copy link
Contributor

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?

@freak4pc
Copy link
Contributor

freak4pc commented Aug 8, 2016

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

@jpsim
Copy link
Collaborator

jpsim commented Aug 21, 2016

@freak4pc's recommendation is correct. MARK-style comments should be double-slashed, not triple.

@jpsim jpsim closed this as completed Aug 21, 2016
@larslockefeer
Copy link
Contributor Author

Thanks @freak4pc for the recommendation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants