← every case · 1000 · comments

1020-comment_then_code_then_comment

a line that opens with a block comment, holds code, and closes with another, the way a generated lookup table writes an index in front of a value and a note after it

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1code/* 00 */ int first = 1; /* a note */
2codeint second = 2;

stringcommentthe tag around another language

What each tool answered

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

cloc --json cases/1000-comments/1020-comment_then_code_then_comment/input.c

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

mezura cases/1000-comments/1020-comment_then_code_then_comment/input.c --output json --hide timing --counting content

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

mezura cases/1000-comments/1020-comment_then_code_then_comment/input.c --output json --hide timing --counting region

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

scc --format json cases/1000-comments/1020-comment_then_code_then_comment/input.c

tokei.default ✗ fails

the line counts as a comment although there is code on it

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

tokei --output json cases/1000-comments/1020-comment_then_code_then_comment/input.c