← every case · 1000 · comments

1210-close_touching_reopen_nesting

a Haskell block comment closes and the next one opens with nothing between the two symbols. The pair nests, so a counter tracking how deep it is must not read the reopener as two levels

read ascloc.defaultmezura.contentmezura.regionscc.defaulttokei.default
input.hs
1comments{- first block
2comments-}{- second block opens where the first closed
3comments-}
4codex = 1

stringcommentthe tag around another language

What each tool answered

cloc.default ✗ fails

an opener that comes after a closer on the same line is not acted on, whether the two symbols touch or a space separates them, so the block it reopens is never a comment

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

cloc --json cases/1000-comments/1210-close_touching_reopen_nesting/input.hs

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

mezura cases/1000-comments/1210-close_touching_reopen_nesting/input.hs --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/1000-comments/1210-close_touching_reopen_nesting/input.hs --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/1000-comments/1210-close_touching_reopen_nesting/input.hs

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

tokei --output json cases/1000-comments/1210-close_touching_reopen_nesting/input.hs