← every case · 8000 · what the line counts as

8050-doc_comment_with_no_text_ending_a_block

the same empty /// line as case 8040, this time the last one, with code and no more documentation under it. A counter that decides an empty marker by what surrounds it has nothing to look at here, and the answer has to come out the same, since the line itself has not changed

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.rs
1comments/// A documented function.
2comments///
3codefn documented() {}

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 cases/8000-what_the_line_counts_as/8050-doc_comment_with_no_text_ending_a_block/input.rs

mezura.content ✓ agrees
the rules ask3 lines · 1 code · 1 comments · 1 extra
it answers3 lines · 1 code · 1 comments · 1 extra

mezura cases/8000-what_the_line_counts_as/8050-doc_comment_with_no_text_ending_a_block/input.rs --output json --hide timing --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/8000-what_the_line_counts_as/8050-doc_comment_with_no_text_ending_a_block/input.rs --output json --hide timing --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 cases/8000-what_the_line_counts_as/8050-doc_comment_with_no_text_ending_a_block/input.rs

tokei.default ✗ fails

the '///' line is counted as neither comment nor blank, so a file of 3 lines is reported as 2

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

tokei --output json cases/8000-what_the_line_counts_as/8050-doc_comment_with_no_text_ending_a_block/input.rs