← every case · 4000 · a quote that opens nothing

4030-character_written_with_a_backslash

Clojure writes a character as a backslash and the character itself, so a double quote is written \". It reads like an escaped quote and is not one: there is no string around it for it to be inside, and it opens none. The real string above it runs over two lines and the second begins with ;, so a counter that reads no string at all counts that line as a comment

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.clj
1code(def s "first
2code; still inside the string")
3code(def q \")
4code(def x 1)
5comments; a real comment

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

its Clojure filters drop every line that begins with ;, so line 2, inside the string opened on line 1, is counted as a comment

the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 3 code · 2 comments

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj

cloc.default ✗ fails

--strip-str-comments

its Clojure filters drop every line that begins with ;, so line 2, inside the string opened on line 1, is counted as a comment

the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 3 code · 2 comments

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj --strip-str-comments

cloc.docstring-as-code ✗ fails

its Clojure filters drop every line that begins with ;, so line 2, inside the string opened on line 1, is counted as a comment

the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 3 code · 2 comments

cloc --json --config /tmp/linejudge-empty-file cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj --docstring-as-code

codestats.default ✓ agrees
the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 4 code · 1 comments

codestats cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask5 lines · 4 code · 1 comments · 0 extra
it answers5 lines · 4 code · 1 comments · 0 extra

mezura cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 4 code · 1 comments

mezura cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj --output json --hide timing --no-default-config --no-local --counting region

scc.default ✗ fails

its Clojure has no string at all, so line 2, inside the string opened on line 1, begins with ; and is read as a comment

the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 3 code · 2 comments

scc --format json --no-config cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj

tokei.default ✗ fails

line 2 sits inside the string opened on line 1 and begins with ;, and it is read as a comment. The string itself does run on: with plain text on that line the line comes out as code

the rules ask5 lines · 0 blanks · 4 code · 1 comments
it answers5 lines · 0 blanks · 3 code · 2 comments

tokei --output json cases/4000-a_quote_that_opens_nothing/4030-character_written_with_a_backslash/input.clj