blob: 266a1f491ac771787adf1cd818a91228e9f83168 [file] [log] [blame]
Sticky comments:
// keep-sorted-test start sticky_comments=yes
foo
// comment
bar
// multi line
// comment
baz
// keep-sorted-test end
Sticky comments with different comment sequence:
# keep-sorted-test start sticky_comments=yes
foo
# comment
bar
# keep-sorted-test end
Sticky comments with wrong comment sequence:
# keep-sorted-test start sticky_comments=yes
foo
bar
// comment with wrong comment sequence
# keep-sorted-test end
Trailing comments:
// keep-sorted-test start sticky_comments=yes
foo
// comment
bar
// trailing
// comment
// keep-sorted-test end
Only sticky comments:
// keep-sorted-test start sticky_comments=yes
// only
// comments
// keep-sorted-test end
Only non-sticky comments:
// keep-sorted-test start sticky_comments=no
// only
// comments
// keep-sorted-test end
Slash-star-style comments:
/* keep-sorted-test start */
2
1
/* comment on 3 */
3
/* keep-sorted-test end */
Dash-dash-style comments:
-- keep-sorted-test start
2
1
-- comment on 3
3
-- keep-sorted-test end
Semicolon-style comments:
; keep-sorted-test start
2
1
; comment on 3
3
; keep-sorted-test end
HTML-style comments:
<!-- keep-sorted-test start -->
2
1
<!-- comment on 3 -->
3
<!-- keep-sorted-test end -->
Additional prefixes aren't counted as part of the comment:
// some prefix (normally this is go/) keep-sorted-test start
2
1
// comment on 3
3
// keep-sorted-test end
Non-comment prefixes are still sorted:
* keep-sorted-test start
2
1
* not a comment on 3
3
* keep-sorted-test end