← every case · 1000 · comments

1235-one_symbol_for_a_line_comment_and_a_string

Vim script writes a line comment and a string with one symbol, the double quote. At the start of a line it opens a comment, and after a command such as echo it opens a string. A counter that reads the quote on the first line as the opening of a string counts that comment as code

read ascloc.defaultcloc.docstring-as-codecodestats.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.vim
1comments" a comment
2codeecho "text"

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim

cloc.default ✓ agrees

--strip-str-comments

the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim --strip-str-comments

cloc.docstring-as-code ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

cloc --json --config /tmp/linejudge-empty-file cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim --docstring-as-code

codestats.default ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

codestats cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim --output json-compact --include-generated --no-gitignore --hidden --no-config

mezura.content ✓ agrees
the rules ask2 lines · 1 code · 1 comments · 0 extra
it answers2 lines · 1 code · 1 comments · 0 extra

mezura cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim --output json --hide timing --no-default-config --no-local --counting content

mezura.region ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

mezura cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim --output json --hide timing --no-default-config --no-local --counting region

scc.default ✓ agrees
the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 1 code · 1 comments

scc --format json --no-config cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim

tokei.default ✗ fails

the double quote at the head of the comment line opens a string, so that line counts as code. A file holding only that line counts as one line of code

the rules ask2 lines · 0 blanks · 1 code · 1 comments
it answers2 lines · 0 blanks · 2 code · 0 comments

tokei --output json cases/1000-comments/1235-one_symbol_for_a_line_comment_and_a_string/input.vim