Rule Request: Enforcing one space after slashes for comments #3233
Closed
Description
New Issue Checklist
- Updated SwiftLint to the latest version
- I searched for existing GitHub issues
New rule request
I looked around for this rule but didn't see it, so let me know if I missed it. It would be nice to have a rule which fails when inline comments (double-slash style) don't have one space between the double-slashes and the first text character.
Violations:
//something
//something
// something
Non-triggering examples:
// something
// something
I think that most people feel that one space after the slashes is easier to read (though to be fair I don't have hard evidence, only anecdotal). All the Xcode templates and Apple sample code that I've seen, for example, use exactly one space after the slashes. Happy to make this an opt-in rule.