For JavaScript and TypeScript files, including JSX/TSX, the estimate starts at 1 per file and adds 1 for each if, loop, non-default case, catch, runtime conditional expression, and short-circuit operator (&&, ||, ?? and their conditional assignments). An else if counts once. Function bodies contribute decisions without adding another base point. Comments, literal text, regex contents and type syntax do not contribute; executable template and JSX expressions do. Switch/default, else, optional chaining and default parameter syntax add no separate point. This convention is not a runtime trace or a sum of individual function complexities.
Qt Linguist translation catalogs also use the .ts extension. A bounded inspection of the XML prolog and root distinguishes these catalogs from TypeScript. Catalogs retain their file rows, original extension and byte sizes, while code metrics remain blank with a translation-data reason in Notes. An inconclusive XML prefix or unsupported encoding remains inventory-only. This routing does not extract translations or add QML support.
HTML uses the same rules for executable inline scripts with an absent/empty type, module, text/javascript or application/javascript type. Markup, styles, inert content, data scripts and event-handler attributes are excluded; external script files have their own rows.
Python (.py) also starts at 1 per file. It adds 1 for each if/elif, for/async for/while loop, except/except* handler, conditional expression, and/or operator, comprehension or generator for/filter clause, and source assert. Chained comparisons add one point per comparison after the first. Each refutable match case adds 1 and each guard adds 1; an irrefutable capture or wildcard pattern adds none. Nested subpatterns and OR-pattern alternatives do not add separate points. Function, lambda and class bodies contribute decisions without another base point. Comments, identifiers, docstrings and other literal text are ignored; f-string replacement and format expressions are analyzed. Type syntax adds no point itself, while actual decision expressions in annotations, defaults and decorators count. This is the source convention even when assertions are disabled or expressions are never evaluated. Match/try/finally/else, with, await/yield, return/raise, break/continue, not and bitwise operators add no separate points; called implementations and dynamic source strings are not expanded.
C (.c) also starts at 1 per file. It adds 1 for each if (including each else if), for, while and do-while loop, case label, conditional operator (including GNU a ?: b), && or || operator, and Microsoft __except handler; default, switch, else, goto, break, continue, return and the unary ! add none. Function bodies contribute decisions without another base point. Comments, string and character literals, identifiers, type syntax, sizeof/_Alignof/offsetof operands, attributes, inline assembly and _Static_assert conditions are ignored. Preprocessor directive lines never count: #if/#elif conditions and #define bodies add nothing, while code in every #if/#else branch counts, so the value estimates the source across all build configurations. Macro calls are not expanded: branches hidden inside a macro add nothing, but decisions written in its arguments count. Where the parser cannot fully read the code, for example a macro used without a semicolon, counting continues through its error recovery, and a reserved keyword such as if or while that recovery misreads still counts.
C++ (.cpp) follows the C rules and also adds 1 for each catch handler (including catch (...)), range-based for loop, and/or alternative operator, and logical fold expression (one per fold, such as (args && ...)). An if constexpr counts like any other if, as a branch in the source. Lambda, member-function and nested-class bodies contribute decisions without another base point, and default arguments and member initializers are counted. Template argument and parameter lists, decltype, requires clauses and expressions, concepts, static_assert and noexcept specifications add nothing, and && in a type (an rvalue or forwarding reference, a reference qualifier or an operator&& name) never counts. try, throw, new, delete, co_await, co_yield, co_return and attributes such as [[likely]] add none. Templates are not instantiated, so the value describes the source as written.
Java (.java) also starts at 1 per file. It adds 1 for each if (including each else if), basic or enhanced for, while or do-while loop, non-default case label or arrow rule, pattern guard when, catch clause, conditional expression, && or || operator, and source assert. A grouped case such as case A, B counts once, and a multi-catch such as catch (A | B e) counts once. Method, constructor, lambda, initializer and nested-class bodies contribute decisions without another base point. Comments and Javadoc, string and character literals, text blocks, annotations and their arguments, and type arguments and parameters are ignored; a generic wildcard ? is not a conditional. Whole Java string literals are excluded, including preview string-template expressions recognized by the installed grammar. default, else, try/finally, try-with-resources, synchronized, instanceof, method references, jumps and lambdas themselves add no separate point. Assertions count as source decisions even when disabled at runtime. Incomplete or unsupported syntax leaves the value unavailable rather than falling back to a text count.
C# (.cs) also starts at 1 per file. It adds 1 for each if/else if, for/foreach/while/do-while loop, non-default case label, non-discard switch-expression arm, when guard, catch clause, exception filter, conditional expression, &&/||/?? operator and ??= assignment. A discard _ arm, including a parenthesized discard, adds no arm point, but its guard and body decisions still count; a var capture arm counts. LINQ adds 1 per where and per additional from after the first in each query. Method, local-function, lambda and initializer bodies contribute decisions without another base point. Comments and XML docs, ordinary/verbatim/raw string text, character literals, attributes, type arguments/parameters/constraints and typeof/sizeof/nameof/default(T) operands are ignored. Expressions in interpolated-string holes and alignment positions count; format text does not. Nullable ? types, ?., null-forgiving !, is/as, ranges and pattern and/or/not add no points. Directive lines never count, and code in every #if branch does. Incomplete or unsupported syntax leaves the value unavailable, including directives that the installed parser cannot read; no preprocessing or text-count fallback is used.
Kotlin (.kt) and KotlinScript (.kts) also start at 1 per file. They add 1 for each if/else if, for/while/do-while loop, catch block, &&/|| operator and Elvis ?: operator. Each non-else when entry adds 1 regardless of how many conditions it lists; decisions inside all conditions and entry bodies still count, including an else body. Function, local-function, lambda, initializer and class bodies contribute decisions without another base point. Comments and KDoc, character literals, string literal text, annotations, type arguments/parameters and constraints are ignored. Expressions in ordinary and raw string templates contribute their own decisions; a simple $name adds none. Safe calls ?., non-null assertions !!, nullable types, is/in checks, try/finally, throw, jumps and scope-function calls add no point themselves, while written body decisions still count. Incomplete or unsupported syntax leaves the whole value unavailable, including hidden parser errors in otherwise valid Kotlin. KotlinScript uses the same grammar and counting rules; scripts and Gradle builds are not executed.
A successfully analyzed file with no counted decisions scores 1. For JavaScript, TypeScript, HTML, Python, Java, C#, Kotlin and KotlinScript, incomplete or unsupported syntax leaves this cell blank; C and C++ are counted through the parser's error recovery instead. Unreadable input or analysis limits leave the cell blank for every language. Python, C, C++, Java, C#, Kotlin and KotlinScript syntax coverage follow the installed parsers, without interpreter execution, preprocessing, compilation or full compiler-level semantic validation. Other supported languages retain a rough text heuristic that can count words inside comments, strings and identifiers; compare those estimates cautiously.