← every case · 4000 · a quote that opens nothing

4010-char_literal_holding_a_quote

a Rust character literal holding a double quote. The quote is the value of the character and opens no string, so the block comment after it on the same line is real. A counter that opens a string at the quote hides that opener whether its strings end with the line or run on, and counts the second line of the comment as code

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.rs
1codelet quote: char = '"'; /* a real comment
2commentsthat closes on this line */
3comments// a second real comment

stringcommentthe tag around another language

What each tool answered

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

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs

cloc.default ✓ agrees

--strip-str-comments

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

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs --strip-str-comments

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

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs --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/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs --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/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs --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/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs --output json --hide timing --no-default-config --no-local --counting region

scc.default ✗ fails

the quote opens a string, so the comment after it and the one under it are counted as code

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

scc --format json --no-config cases/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs

tokei.default ✗ fails

the quote opens a string, so the comment after it and the one under it are counted as code

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

tokei --output json cases/4000-a_quote_that_opens_nothing/4010-char_literal_holding_a_quote/input.rs