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

Detect triple slashes (///) in mark rule #2866

Closed
2 tasks done
nvanfleet opened this issue Sep 13, 2019 · 3 comments
Closed
2 tasks done

Detect triple slashes (///) in mark rule #2866

nvanfleet opened this issue Sep 13, 2019 · 3 comments
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@nvanfleet
Copy link
Contributor

New Issue Checklist

New rule request

Using /// MARK: doesn't integrate with Xcode by creating a section in the code. You have to use // MARK: with // instead of ///.

I propose there be a lint to make sure all comment marks follow that format.

  1. Why should this rule be added? Share links to existing discussion about what
    the community thinks about this.

This is otherwise a silent issue where the mark is not used to create a sections in the file.

  1. Provide several examples of what would and wouldn't trigger violations.

What would trigger a violation: anytime you have /// MARK:

  1. Should the rule be configurable, if so what parameters should be configurable?

Not really.

  1. Should the rule be opt-in or enabled by default? Why?
    See README.md for guidelines on when to mark a rule as opt-in.

enabled by default
I expect that engineers expect it to work when they do /// MARK but don't check to see if it did. I don't see a use case where their guidelines could be to use ///

@marcelofabri
Copy link
Collaborator

We already have mark rule: https://github.com/realm/SwiftLint/blob/master/Rules.md#mark.

This seems like a good first issue for anyone interested 😊

@marcelofabri marcelofabri added the enhancement Ideas for improvements of existing features and rules. label Sep 13, 2019
@marcelofabri marcelofabri changed the title Rule Request: format_comment_mark Detect triple slashes (///) in mark rule Sep 13, 2019
@jpsim
Copy link
Collaborator

jpsim commented Sep 13, 2019

Yup, this should probably be done by updating the mark rule rather than creating a new rule. Thanks for the suggestion!

@jpsim
Copy link
Collaborator

jpsim commented Sep 19, 2019

Fixed in #2868.

@jpsim jpsim closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

No branches or pull requests

3 participants