← every case · 5000 · line splices

5030-line_splice_inside_a_comment

a backslash at the end of a line comment continues it onto the next line in C

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1comments// this comment continues \
2comments onto the next line in C
3codeint x = 1;

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

a line comment ending in a backslash takes its line break with it and stops there, so the line spliced onto it is joined to the comment's own line and counts as code

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

cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c

cloc.default ✗ fails

--strip-str-comments

a line comment ending in a backslash takes its line break with it and stops there, so the line spliced onto it is joined to the comment's own line and counts as code

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

cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c --strip-str-comments

cloc.docstring-as-code ✗ fails

a line comment ending in a backslash takes its line break with it and stops there, so the line spliced onto it is joined to the comment's own line and counts as code

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

cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c --docstring-as-code

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

codestats cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c --output json-compact --include-generated --no-gitignore --hidden --no-config

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

mezura cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c --output json --hide timing --no-default-config --no-local --counting content

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

mezura cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c --output json --hide timing --no-default-config --no-local --counting region

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

scc --format json --no-config cases/5000-line_splices/5030-line_splice_inside_a_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 · 1 code · 2 comments
it answers3 lines · 0 blanks · 2 code · 1 comments

tokei --output json cases/5000-line_splices/5030-line_splice_inside_a_comment/input.c