← every case · 5000 · line splices
a block comment closes and a line comment opens on the same line, with a space between the two. That space is not code, so the splice ending the line still carries the comment on
| 1 | codecodecodecodecode | int a = 1; |
| 2 | commentscommentscommentscommentscomments | /* block */ // trailing \ |
| 3 | commentscommentscommentscommentscomments | int x = 1; |
| 4 | codecodecodecodecode | int y = 2; |
stringcommentthe tag around another language
a block comment closing earlier on the line does not move where the line comment after it stops, which is still the line break, so the line spliced onto it counts as code
cloc --json cases/5000-line_splices/5050-line_splice_after_a_closed_block_comment/input.c
mezura cases/5000-line_splices/5050-line_splice_after_a_closed_block_comment/input.c --output json --hide timing --counting content
mezura cases/5000-line_splices/5050-line_splice_after_a_closed_block_comment/input.c --output json --hide timing --counting region
the line with the two comments on it is read correctly and the splice is not, so the line joined to the comment counts as code
scc --format json cases/5000-line_splices/5050-line_splice_after_a_closed_block_comment/input.c
two faults on one line, so it loses two. The line reads as code, which case 1070 holds on its own, and the splice does not carry, which case 5030 holds
tokei --output json cases/5000-line_splices/5050-line_splice_after_a_closed_block_comment/input.c