← every case · 1000 · comments

1090-block_comment_closed_after_a_line_comment

'//*/' closes a block comment, because '//' means nothing inside one. It is half of the C idiom for switching a block off and on: one character added in front of the opener makes that line a line comment, and this closer is then a line comment too instead of a stray symbol

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.cs
1codeclass Kept
2code{
3comments /* Keep it for reference
4comments int old = 1;
5comments //*/
6code int kept = 2;
7code}

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 4 code · 3 comments

cloc --json cases/1000-comments/1090-block_comment_closed_after_a_line_comment/input.cs

mezura.content ✓ agrees
the rules ask7 lines · 2 code · 2 comments · 3 extra
it answers7 lines · 2 code · 2 comments · 3 extra

mezura cases/1000-comments/1090-block_comment_closed_after_a_line_comment/input.cs --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 4 code · 3 comments

mezura cases/1000-comments/1090-block_comment_closed_after_a_line_comment/input.cs --output json --hide timing --counting region

scc.default ✓ agrees
the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 4 code · 3 comments

scc --format json cases/1000-comments/1090-block_comment_closed_after_a_line_comment/input.cs

tokei.default ✗ fails

the block is never closed, so the rest of the file counts as comment

the rules ask7 lines · 0 blanks · 4 code · 3 comments
it answers7 lines · 0 blanks · 2 code · 5 comments

tokei --output json cases/1000-comments/1090-block_comment_closed_after_a_line_comment/input.cs