← every case · 5000 · line splices

5060-code_then_a_spliced_line_comment

a line holding real code ends in a spliced line comment, so the next line belongs to that comment in C

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1codeint a = 1; // comment \
2comments joined to the comment
3codeint x = 1;

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

cloc --json cases/5000-line_splices/5060-code_then_a_spliced_line_comment/input.c

mezura.content ✓ agrees
the rules ask3 lines · 2 code · 1 comments · 0 extra
it answers3 lines · 2 code · 1 comments · 0 extra

mezura cases/5000-line_splices/5060-code_then_a_spliced_line_comment/input.c --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

mezura cases/5000-line_splices/5060-code_then_a_spliced_line_comment/input.c --output json --hide timing --counting region

scc.default ✗ fails

the comment ends at the newline, so the line joined to it is counted as code

the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 3 code · 0 comments

scc --format json cases/5000-line_splices/5060-code_then_a_spliced_line_comment/input.c

tokei.default ✗ fails

the comment ends at the newline, so the line joined to it is counted as code

the rules ask3 lines · 0 blanks · 2 code · 1 comments
it answers3 lines · 0 blanks · 3 code · 0 comments

tokei --output json cases/5000-line_splices/5060-code_then_a_spliced_line_comment/input.c