← every case · 1000 · comments

1070-block_comment_closed_then_line_comment

a block comment opens and closes on one line and a line comment follows it. Nothing is outside the two but the space between them, so the line is comment and holds no code

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1comments/* block */ // trailing
2codeint x = 1;

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

cloc --json cases/1000-comments/1070-block_comment_closed_then_line_comment/input.c

mezura.content ✓ agrees
the rules ask2 lines · 1 code · 1 comments · 0 extra
it answers2 lines · 1 code · 1 comments · 0 extra

mezura cases/1000-comments/1070-block_comment_closed_then_line_comment/input.c --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

mezura cases/1000-comments/1070-block_comment_closed_then_line_comment/input.c --output json --hide timing --counting region

scc.default ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

scc --format json cases/1000-comments/1070-block_comment_closed_then_line_comment/input.c

tokei.default ✗ fails

the line counts as code, because it opens a block and does not end with that block's closer. Any number of blocks closed on one line ends the same way once a line comment follows them

the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 2 code · 0 comments

tokei --output json cases/1000-comments/1070-block_comment_closed_then_line_comment/input.c