← every case · 8000 · what the line counts as

8030-blank_line_inside_a_multiline_string

a blank line inside a string that runs over several lines. A definition and not a mistake: blank to a counter that asks what the line itself says, code to one that asks what the line is inside

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.py
1codevalue = """
2codefirst line of the string
3blanks
4codethird line after a blank one
5code"""
6codeprint(value)

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

the empty line is set aside as blank before any comment rule runs, which is what its own rules ask, and the rest of the string around it is read as documentation

the rules ask6 lines · 1 blanks · 5 code · 0 comments
it answers6 lines · 1 blanks · 2 code · 3 comments

cloc --json cases/8000-what_the_line_counts_as/8030-blank_line_inside_a_multiline_string/input.py

mezura.content ✓ agrees
the rules ask6 lines · 5 code · 0 comments · 1 extra
it answers6 lines · 5 code · 0 comments · 1 extra

mezura cases/8000-what_the_line_counts_as/8030-blank_line_inside_a_multiline_string/input.py --output json --hide timing --counting content

mezura.region ✓ agrees
the rules ask6 lines · 0 blanks · 6 code · 0 comments
it answers6 lines · 0 blanks · 6 code · 0 comments

mezura cases/8000-what_the_line_counts_as/8030-blank_line_inside_a_multiline_string/input.py --output json --hide timing --counting region

scc.default ✓ agrees
the rules ask6 lines · 0 blanks · 6 code · 0 comments
it answers6 lines · 0 blanks · 6 code · 0 comments

scc --format json cases/8000-what_the_line_counts_as/8030-blank_line_inside_a_multiline_string/input.py

tokei.default ✓ agrees
the rules ask6 lines · 0 blanks · 6 code · 0 comments
it answers6 lines · 0 blanks · 6 code · 0 comments

tokei --output json cases/8000-what_the_line_counts_as/8030-blank_line_inside_a_multiline_string/input.py