← every case · 2000 · string forms

2020-string_symbol_inside_comment

an unmatched quote inside a comment opens nothing. A comment line follows the code, so a counter that opens a string at that quote and lets it run across lines counts that comment as code

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.js
1comments// an unmatched quote " lives here
2codelet x = 1;
3comments// a 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/2000-string_forms/2020-string_symbol_inside_comment/input.js

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/2000-string_forms/2020-string_symbol_inside_comment/input.js --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/2000-string_forms/2020-string_symbol_inside_comment/input.js --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/2000-string_forms/2020-string_symbol_inside_comment/input.js --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/2000-string_forms/2020-string_symbol_inside_comment/input.js --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/2000-string_forms/2020-string_symbol_inside_comment/input.js --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/2000-string_forms/2020-string_symbol_inside_comment/input.js

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

tokei --output json cases/2000-string_forms/2020-string_symbol_inside_comment/input.js