Pattern: Malformed comment spacing
Issue: -
Prefer at least one space after slashes for comments.
Examples of correct code:
// This is a comment
/// Triple slash comment
// Multiline double-slash
// comment
/// Multiline triple-slash
/// comment
/// Multiline triple-slash
/// - This is indented
// - MARK: Mark comment
/* Asterisk comment */
/*
Multiline asterisk comment
*/
}
}
Examples of incorrect code:
//↓Something
//↓MARK
//↓👨👨👦👦Something
func a() {
//↓This needs refactoring
print("Something")
}
//↓We should improve above function
///↓This is a comment
/// Multiline triple-slash
///↓This line is incorrect, though
//↓- MARK: Mark comment