← every case · 1000 · comments

1080-block_close_touching_a_line_comment

the '//' opening the line comment is formed on the '/' that closes the block comment, so the two share a byte and no search for '//' yields both of the places it appears to be at. Case 1070 is the same line with a space between them, and Pascal's '{ block }//trailing' is the same line again with a closer that shares no byte with it

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/1080-block_close_touching_a_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/1080-block_close_touching_a_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/1080-block_close_touching_a_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/1080-block_close_touching_a_line_comment/input.c

tokei.default ✗ fails

the line counts as code, for the reason case 1070 gives, and the shared byte adds nothing

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/1080-block_close_touching_a_line_comment/input.c