← every case

sccgithub.com

measured at scc version 4.0.0 · downloaded from github-release-asset as boyter/scc

What it fails

scc.default.svgdoes not agree on 27 of 83 cases

1180-cmake_bracket_comment the bracket comment is not recognised at all, so the whole file counts as code
1200-nested_block_comment_that_nests the inner closer ends the comment although Haskell's pair nests, so the text after it is left standing as code
1220-nested_block_comment_in_odin the block is ended at the inner closer, so the two lines after it are counted as code
1230-a_comment_word_at_the_head_of_a_longer_word a line whose first word begins with REM is taken as a comment whatever letters follow, so the command counts as one
2120-heredoc_holding_an_apostrophe the apostrophe opens a string and every comment under it is counted as code
2150-delimited_raw_string_names_its_own_closer the delimited form is not recognised, so the two quotes on the opening line pair off as an ordinary string and the block opener under them, outside it, opens a comment. Without the lone quote the file comes out right
2190-triple_quote_read_as_three_short_ones an apostrophe does not open a string in Groovy, so the three apostrophes are code, the // below counts as a comment and the /* under it opens a block that nothing closes
3070-backslash_before_a_closing_quote_in_sql the backslash cancels the closing quote, and its strings cross lines, so the comment under the path is counted as string content
3080-backtick_escapes_inside_a_double_quoted_string the backtick is no escape to it, so the last quote opens a string that crosses lines
4010-char_literal_holding_a_quote the quote opens a string, so both comments under it are counted as code
4020-two_char_literals_holding_escapes every comment under the line is lost
5020-blank_line_inside_a_spliced_string the string is carried past the blank line, so the comment line is counted as code
5030-line_splice_inside_a_comment the comment ends at the newline, so the line joined to it is counted as code
5040-line_splice_in_a_comment_with_no_words the comment ends at the newline, so the line joined to it is counted as code
5050-line_splice_after_a_closed_block_comment 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
5060-code_then_a_spliced_line_comment the comment ends at the newline, so the line joined to it is counted as code
5070-blank_line_inside_a_spliced_comment the comment ends at the newline, so the empty line joined to it is counted as blank
6030-opening_tag_split_over_two_lines the block is not found, so the comment inside it is read with the page's symbols, and HTML has no //
6040-script_tag_in_upper_case no script block is separated out of any page, whatever case its tag is written in, so the comment inside it counts as markup
6050-script_closer_written_with_a_space the block is not found, so its line is counted as the page and not as JavaScript
6080-block_named_by_a_mime_type the block is not found, so the comment inside it counts as markup
6090-vue_blocks_count_as_their_own_languages the file is counted as one language from beginning to end, so neither block is found. What makes every line code is the apostrophe in it's, which opens a string that never closes: with that word spelled without it, the same unsplit file comes out right
6100-block_language_named_by_the_tag the file is counted as one language from beginning to end. The totals come out right because both block comment symbols happen to be the ones Vue's own markup already declares, and neither block is found
6110-php_block_holding_html_around_it the file is read as php from beginning to end, so the html comment is counted as code
6120-script_inside_html_inside_php it has no notion of a file holding a second language, and the js comment survives only because php spells its line comment the same way
7010-regex_literal_holding_a_quote the quote opens a string that runs on, so the comment under it is counted as code
7020-regex_holding_a_comment_opener the /* opens a comment and swallows the two lines under it

The rules it is judged by

defaulthow it counts when it is run with no extra flags

code
anything-outside-spans-is-code
take the strings and the comments away and something is still there
code
a-plain-string-is-code
part of the line is inside a string
the line is not inside a block that opened with three quotes at the start of a line
comments
a-doc-string-is-documentation
the line is inside a block that opened with three quotes at the start of a line
take the strings and the comments away and nothing is left but spaces
comments
a-comment-alone-is-comments
part of the line is inside a comment
take the strings and the comments away and nothing is left but spaces
no part of the line is inside a string
blanks
blank-outside-everything-is-blank
the line is nothing but spaces and tabs
no part of the line is inside a comment
no part of the line is inside a string