← every case · 8000 · what the line counts as

8040-doc_comment_with_no_text

a documentation line holding nothing but the /// that marks it, which is how a blank line is put between two paragraphs of documentation. It is a comment to a counter that asks what the line is inside, and neither code nor comment to one that asks what the line says, since it says nothing

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.rs
1comments/// A documented function.
2comments///
3comments/// The paragraph after the empty doc line.
4codefn documented() {}

stringcommentthe tag around another language

What each tool answered

cloc.default ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

cloc --json cases/8000-what_the_line_counts_as/8040-doc_comment_with_no_text/input.rs

mezura.content ✓ agrees
the rules ask4 lines · 1 code · 2 comments · 1 extra
it answers4 lines · 1 code · 2 comments · 1 extra

mezura cases/8000-what_the_line_counts_as/8040-doc_comment_with_no_text/input.rs --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

mezura cases/8000-what_the_line_counts_as/8040-doc_comment_with_no_text/input.rs --output json --hide timing --counting region

scc.default ✓ agrees
the rules ask4 lines · 0 blanks · 1 code · 3 comments
it answers4 lines · 0 blanks · 1 code · 3 comments

scc --format json cases/8000-what_the_line_counts_as/8040-doc_comment_with_no_text/input.rs

tokei.default ✗ fails

the bare marker is counted blank, although a blank line inside a '/** */' doc comment of the same language counts as comment, so the answer turns on which of the two doc syntaxes was used

the rules ask4 lines · 0 blanks · 1 code · 3 comments · Markdown 3
it answers4 lines · 1 blanks · 1 code · 2 comments · Markdown 3

tokei --output json cases/8000-what_the_line_counts_as/8040-doc_comment_with_no_text/input.rs