← every case · 5000 · line splices

5040-line_splice_in_a_comment_with_no_words

the splice of case 5030 on a comment line holding no letter or digit at all, which is how a decorative rule is written. What a line says has no bearing on whether it continues

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.c
1codeint a = 1;
2comments// ---- \
3commentsint b = 2;
4codeint c = 3;

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

a comment carrying no letter or digit is read like any other: it 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 ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 3 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/5000-line_splices/5040-line_splice_in_a_comment_with_no_words/input.c

cloc.default ✗ fails

--strip-str-comments

a comment carrying no letter or digit is read like any other: it 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 ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 3 code · 1 comments

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

cloc.docstring-as-code ✗ fails

a comment carrying no letter or digit is read like any other: it 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 ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 3 code · 1 comments

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

codestats.default ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

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

mezura.content ✓ agrees
the rules ask4 lines · 2 code · 1 comments · 1 extra
it answers4 lines · 2 code · 1 comments · 1 extra

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

mezura.region ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

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

scc.default ✓ agrees
the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 2 code · 2 comments

scc --format json --no-config cases/5000-line_splices/5040-line_splice_in_a_comment_with_no_words/input.c

tokei.default ✗ fails

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

the rules ask4 lines · 0 blanks · 2 code · 2 comments
it answers4 lines · 0 blanks · 3 code · 1 comments

tokei --output json cases/5000-line_splices/5040-line_splice_in_a_comment_with_no_words/input.c