← every case · 3000 · escapes and the closing quote

3050-verbatim_string_ending_in_a_backslash

a verbatim string whose last byte is a backslash. In F# the body of @"..." is literal, so the closing quote closes it whatever precedes it, and the string ends where it looks like it ends. A block comment opens after it on the same line, so a counter that leaves the string open hides the opener whether its strings end with the line or run on. The string runs over three lines and the middle one begins with //, so a counter that reads no verbatim string at all counts that line as a comment

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.fs
1codelet dirs = @"C:\temp\
2code// still inside the string
3codeD:\cache\" (* a real comment
4commentsthat closes on this line *)
5codelet x = 1

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

its F# filters drop every line that begins with //, so line 2, inside the verbatim string, 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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs

cloc.default ✗ fails

--strip-str-comments

its F# filters drop every line that begins with //, so line 2, inside the verbatim string, 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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs --strip-str-comments

cloc.docstring-as-code ✗ fails

its F# filters drop every line that begins with //, so line 2, inside the verbatim string, 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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs --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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs --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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs --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/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs --output json --hide timing --no-default-config --no-local --counting region

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

scc --format json --no-config cases/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs

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

tokei --output json cases/3000-escapes_and_the_closing_quote/3050-verbatim_string_ending_in_a_backslash/input.fs