Skip to content

Commit

Permalink
Merge pull request #335 from shiraji/shiraji/escape-comment-space-for…
Browse files Browse the repository at this point in the history
…-inject-language

Escape comment space for "Inject Language"
  • Loading branch information
shyiko authored Feb 4, 2019
2 parents 850b5de + a9cd60b commit bff39f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class CommentSpacingRule : Rule("comment-spacing") {
!text.startsWith("//noinspection") &&
!text.startsWith("//region") &&
!text.startsWith("//endregion") &&
!text.startsWith("//language=") &&
!allForwardSlashesRegex.matches(text)
) {
emit(node.startOffset, "Missing space after //", true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class CommentSpacingRuleTest {
"""
//
//noinspection AndroidLintRecycle
//region
//endregion
//language=SQL
// comment
var debugging = false // comment
var debugging = false // comment//word
Expand Down

0 comments on commit bff39f6

Please sign in to comment.