Skip to content

Commit

Permalink
Add inline comment space SwiftLint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
fredpi committed May 2, 2018
1 parent 99df550 commit 7cdc6a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ custom_rules:
name: "If as Guard"
message: "Don't use an if statement to just return – use guard for such cases instead."
severity: warning
inline_comment_space:
included: ".*.swift"
regex: '[^\s(\/\/)]+([ ]{2,}|)(?<!:)\/\/'
name: "Inline comment space"
message: "An inline comment should always have one single leading whitespace."
severity: warning
late_force_unwrapping:
included: ".*.swift"
regex: '\(\S+\?\.\S+\)!'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

Controbutions are very much welcomed. In fact, this repository lives from creative proposals on how to make use of the ability to create custom collections.
Contributions are very much welcomed. In fact, this repository lives from creative proposals on how to make use of the ability to create custom collections.

## Tutorial

Expand Down

0 comments on commit 7cdc6a8

Please sign in to comment.