Public report of swiftlang/swift-syntax, published 28 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 28 October 2026, 22:17 UTC · Survey ID cd_bc32217c8a02486cbe540d155cf5d64b
swiftlang/swift-syntax
Measured 28 October 2026, 22:15 UTC, at code version 237beba
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Dependency hygiene is not measured: SwiftPM pinning read, dependency currency NOT established (SwiftPM has no central registry to ask).
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 87,282 lines of product code in 38 projects, tests not counted · Estimated rebuild effort: about 1.2 person-years · Weakest lens: Security and Compliance, 50
Findings by how serious they are
17 critical476 serious772 minor
34 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
28 October 2026, 22:15 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
41of 41 dimensions measured by tools.
1243of 1265 findings point to an exact file and line, so you can open each one in the code. The other 22 concern the repository as a whole, such as missing documentation.
41dimensions across 6 lenses, read from 87,282 lines of product code in 38 projects.
swiftlang/swift-syntax falls short of our standard for production because it has pipeline tools referenced by a changeable name. It scores 59 out of 100 and is rated Adequate, and 15 of its 17 critical findings are security problems in the build pipeline and in its automatic dependency updates.
Security and Compliance, at 50, is the weakest lens and counts most in the score. The best first step is fixing the three pipeline tools referenced by a changeable name, worth about 6 points. Signing the build's output comes next, worth about 4 points. Raising Security and Compliance to 70 would lift the score to about 66.
Fourteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. One automatic update takes new releases before a bad one can be spotted, and two sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, setting a waiting period for automatic updates and making the hidden dependencies explicit would close these risks.
The product code is 87,282 lines, about €180,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 11 findings
These 11 critical or serious findings were in the previous survey, on 14 October 2026, and are gone from this one.
€59,000 to €300,000, for 986 to 3,129 hours of work, about 1.2 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 59. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 87,282 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED.
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.2 person-years of work. Its weakest lens is Security and Compliance, at 50 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST). Of all the actions in this report, it raises the score most for the work it takes: about 6 points for low effort, because it clears the 3 Static Analysis (SAST) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.2 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 21,113 lines over the last 90 days, which is about 85,625 lines a year. At that pace, the extra work comes to an estimated 4.4 to 28.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
23 modules, with 154 dependencies between them. One loop runs through 20 of the modules, marked above the diagonal.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
Uses a module listed above itPart of a loopThe module itself
1→8 SwiftSyntaxBuilder uses SwiftSyntaxpart of a loop✕
Connections
57 pairs of types, where a type in SwiftSyntaxBuilder uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntaxBuilder uses SwiftSyntax, so a change to SwiftSyntax can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break SwiftSyntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1→11 SwiftSyntaxBuilder uses SwiftParserpart of a loop✕
Connections
7 pairs of types, where a type in SwiftSyntaxBuilder uses a type in SwiftParser.
SwiftSyntaxBuilder uses SwiftParser, so a change to SwiftParser can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break SwiftParser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1→13 SwiftSyntaxBuilder uses SwiftDiagnosticspart of a loop✕
Connections
8 pairs of types, where a type in SwiftSyntaxBuilder uses a type in SwiftDiagnostics.
SwiftSyntaxBuilder uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1→15 SwiftSyntaxBuilder uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
3 pairs of types, where a type in SwiftSyntaxBuilder uses a type in SwiftCompilerPluginMessageHandling.
SwiftSyntaxBuilder uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1→16 SwiftSyntaxBuilder uses SwiftBasicFormatpart of a loop✕
Connections
3 pairs of types, where a type in SwiftSyntaxBuilder uses a type in SwiftBasicFormat.
SwiftSyntaxBuilder uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
1→23 SwiftSyntaxBuilder uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftSyntaxBuilder uses a type in CodeGeneration~SyntaxSupport.
SwiftSyntaxBuilder uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftSyntaxBuilder, while a change to SwiftSyntaxBuilder can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftSyntaxMacros uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftSyntaxMacros, while a change to SwiftSyntaxMacros can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftSyntaxMacros uses a module listed above it, which is the healthy direction.
2→8 SwiftSyntaxMacros uses SwiftSyntaxpart of a loop✕
Connections
36 pairs of types, where a type in SwiftSyntaxMacros uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntaxMacros uses SwiftSyntax, so a change to SwiftSyntax can break SwiftSyntaxMacros, while a change to SwiftSyntaxMacros can't break SwiftSyntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2→11 SwiftSyntaxMacros uses SwiftParserpart of a loop✕
Connections
8 pairs of types, where a type in SwiftSyntaxMacros uses a type in SwiftParser.
SwiftSyntaxMacros uses SwiftParser, so a change to SwiftParser can break SwiftSyntaxMacros, while a change to SwiftSyntaxMacros can't break SwiftParser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2→13 SwiftSyntaxMacros uses SwiftDiagnosticspart of a loop✕
Connections
13 pairs of types, where a type in SwiftSyntaxMacros uses a type in SwiftDiagnostics.
SwiftSyntaxMacros uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftSyntaxMacros, while a change to SwiftSyntaxMacros can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
2→15 SwiftSyntaxMacros uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
3 pairs of types, where a type in SwiftSyntaxMacros uses a type in SwiftCompilerPluginMessageHandling.
SwiftSyntaxMacros uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftSyntaxMacros, while a change to SwiftSyntaxMacros can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftWarningControl uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftWarningControl uses a module listed above it, which is the healthy direction.
3→8 SwiftWarningControl uses SwiftSyntaxpart of a loop✕
Connections
6 pairs of types, where a type in SwiftWarningControl uses a type in SwiftSyntax.
SwiftWarningControl uses SwiftSyntax, so a change to SwiftSyntax can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftSyntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→9 SwiftWarningControl uses SwiftIfConfigpart of a loop✕
Connections
3 pairs of types, where a type in SwiftWarningControl uses a type in SwiftIfConfig.
SwiftWarningControl uses SwiftIfConfig, so a change to SwiftIfConfig can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftIfConfig.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→11 SwiftWarningControl uses SwiftParserpart of a loop✕
Connections
4 pairs of types, where a type in SwiftWarningControl uses a type in SwiftParser.
SwiftWarningControl uses SwiftParser, so a change to SwiftParser can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftParser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→12 SwiftWarningControl uses SwiftIDEUtilspart of a loop✕
Connections
4 pairs of types, where a type in SwiftWarningControl uses a type in SwiftIDEUtils.
SwiftWarningControl uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftIDEUtils.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
3→15 SwiftWarningControl uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
1 pair of types, where a type in SwiftWarningControl uses a type in SwiftCompilerPluginMessageHandling.
SwiftWarningControl uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftWarningControl, while a change to SwiftWarningControl can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
repository uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break repository, while a change to repository can't break SwiftSyntaxBuilder.
Position
Below the diagonal: repository uses a module listed above it, which is the healthy direction.
SwiftOperators uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftOperators, while a change to SwiftOperators can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftOperators uses a module listed above it, which is the healthy direction.
SwiftOperators uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftOperators, while a change to SwiftOperators can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→15 SwiftOperators uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
4 pairs of types, where a type in SwiftOperators uses a type in SwiftCompilerPluginMessageHandling.
SwiftOperators uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftOperators, while a change to SwiftOperators can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
5→16 SwiftOperators uses SwiftBasicFormatpart of a loop✕
Connections
2 pairs of types, where a type in SwiftOperators uses a type in SwiftBasicFormat.
SwiftOperators uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftOperators, while a change to SwiftOperators can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftRefactor uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftRefactor, while a change to SwiftRefactor can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftRefactor uses a module listed above it, which is the healthy direction.
46 pairs of types, where a type in SwiftRefactor uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftRefactor uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftRefactor, while a change to SwiftRefactor can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→16 SwiftRefactor uses SwiftBasicFormatpart of a loop✕
Connections
3 pairs of types, where a type in SwiftRefactor uses a type in SwiftBasicFormat.
SwiftRefactor uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftRefactor, while a change to SwiftRefactor can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
6→23 SwiftRefactor uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftRefactor uses a type in CodeGeneration~SyntaxSupport.
SwiftRefactor uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftRefactor, while a change to SwiftRefactor can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftSyntaxMacroExpansion uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftSyntaxMacroExpansion uses a module listed above it, which is the healthy direction.
SwiftSyntaxMacroExpansion uses SwiftSyntaxMacros, so a change to SwiftSyntaxMacros can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftSyntaxMacros.
Position
Below the diagonal: SwiftSyntaxMacroExpansion uses a module listed above it, which is the healthy direction.
SwiftSyntaxMacroExpansion uses repository, so a change to repository can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break repository.
Position
Below the diagonal: SwiftSyntaxMacroExpansion uses a module listed above it, which is the healthy direction.
SwiftSyntaxMacroExpansion uses SwiftOperators, so a change to SwiftOperators can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftOperators.
Position
Below the diagonal: SwiftSyntaxMacroExpansion uses a module listed above it, which is the healthy direction.
7→8 SwiftSyntaxMacroExpansion uses SwiftSyntaxpart of a loop✕
Connections
76 pairs of types, where a type in SwiftSyntaxMacroExpansion uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntaxMacroExpansion uses SwiftSyntax, so a change to SwiftSyntax can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftSyntax.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→11 SwiftSyntaxMacroExpansion uses SwiftParserpart of a loop✕
Connections
11 pairs of types, where a type in SwiftSyntaxMacroExpansion uses a type in SwiftParser.
SwiftSyntaxMacroExpansion uses SwiftParser, so a change to SwiftParser can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftParser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→12 SwiftSyntaxMacroExpansion uses SwiftIDEUtilspart of a loop✕
Connections
1 pair of types, where a type in SwiftSyntaxMacroExpansion uses a type in SwiftIDEUtils.
SwiftSyntaxMacroExpansion uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftIDEUtils.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→13 SwiftSyntaxMacroExpansion uses SwiftDiagnosticspart of a loop✕
Connections
9 pairs of types, where a type in SwiftSyntaxMacroExpansion uses a type in SwiftDiagnostics.
SwiftSyntaxMacroExpansion uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→15 SwiftSyntaxMacroExpansion uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
10 pairs of types, where a type in SwiftSyntaxMacroExpansion uses a type in SwiftCompilerPluginMessageHandling.
SwiftSyntaxMacroExpansion uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
7→23 SwiftSyntaxMacroExpansion uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
3 pairs of types, where a type in SwiftSyntaxMacroExpansion uses a type in CodeGeneration~SyntaxSupport.
SwiftSyntaxMacroExpansion uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftSyntaxMacroExpansion, while a change to SwiftSyntaxMacroExpansion can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
411 pairs of types, where a type in SwiftSyntax uses a type in SwiftSyntaxBuilder. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntax uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftSyntax uses a module listed above it, which is the healthy direction.
SwiftSyntax uses SwiftSyntaxMacros, so a change to SwiftSyntaxMacros can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftSyntaxMacros.
Position
Below the diagonal: SwiftSyntax uses a module listed above it, which is the healthy direction.
SwiftSyntax uses SwiftWarningControl, so a change to SwiftWarningControl can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftWarningControl.
Position
Below the diagonal: SwiftSyntax uses a module listed above it, which is the healthy direction.
SwiftSyntax uses SwiftSyntaxMacroExpansion, so a change to SwiftSyntaxMacroExpansion can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftSyntaxMacroExpansion.
Position
Below the diagonal: SwiftSyntax uses a module listed above it, which is the healthy direction.
SwiftSyntax uses SwiftIfConfig, so a change to SwiftIfConfig can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftIfConfig.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→10 SwiftSyntax uses SwiftLexicalLookuppart of a loop✕
Connections
70 pairs of types, where a type in SwiftSyntax uses a type in SwiftLexicalLookup. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntax uses SwiftLexicalLookup, so a change to SwiftLexicalLookup can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftLexicalLookup.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
111 pairs of types, where a type in SwiftSyntax uses a type in SwiftParser. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntax uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→15 SwiftSyntax uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
324 pairs of types, where a type in SwiftSyntax uses a type in SwiftCompilerPluginMessageHandling. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntax uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftSyntax, while a change to SwiftSyntax can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
8→16 SwiftSyntax uses SwiftBasicFormatpart of a loop✕
Connections
40 pairs of types, where a type in SwiftSyntax uses a type in SwiftBasicFormat. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftSyntax uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftSyntax, while a change to SwiftSyntax can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftIfConfig uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftIfConfig, while a change to SwiftIfConfig can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftIfConfig uses a module listed above it, which is the healthy direction.
35 pairs of types, where a type in SwiftIfConfig uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftIfConfig uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftIfConfig, while a change to SwiftIfConfig can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→15 SwiftIfConfig uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
12 pairs of types, where a type in SwiftIfConfig uses a type in SwiftCompilerPluginMessageHandling.
SwiftIfConfig uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftIfConfig, while a change to SwiftIfConfig can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→16 SwiftIfConfig uses SwiftBasicFormatpart of a loop✕
Connections
6 pairs of types, where a type in SwiftIfConfig uses a type in SwiftBasicFormat.
SwiftIfConfig uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftIfConfig, while a change to SwiftIfConfig can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftLexicalLookup uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftLexicalLookup uses a module listed above it, which is the healthy direction.
111 pairs of types, where a type in SwiftLexicalLookup uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftLexicalLookup uses SwiftSyntax, so a change to SwiftSyntax can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftSyntax.
Position
Below the diagonal: SwiftLexicalLookup uses a module listed above it, which is the healthy direction.
SwiftLexicalLookup uses SwiftIfConfig, so a change to SwiftIfConfig can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftIfConfig.
Position
Below the diagonal: SwiftLexicalLookup uses a module listed above it, which is the healthy direction.
10→11 SwiftLexicalLookup uses SwiftParserpart of a loop✕
Connections
26 pairs of types, where a type in SwiftLexicalLookup uses a type in SwiftParser. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftLexicalLookup uses SwiftParser, so a change to SwiftParser can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftParser.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→12 SwiftLexicalLookup uses SwiftIDEUtilspart of a loop✕
Connections
1 pair of types, where a type in SwiftLexicalLookup uses a type in SwiftIDEUtils.
SwiftLexicalLookup uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftIDEUtils.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→15 SwiftLexicalLookup uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
6 pairs of types, where a type in SwiftLexicalLookup uses a type in SwiftCompilerPluginMessageHandling.
SwiftLexicalLookup uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→16 SwiftLexicalLookup uses SwiftBasicFormatpart of a loop✕
Connections
1 pair of types, where a type in SwiftLexicalLookup uses a type in SwiftBasicFormat.
SwiftLexicalLookup uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
10→23 SwiftLexicalLookup uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftLexicalLookup uses a type in CodeGeneration~SyntaxSupport.
SwiftLexicalLookup uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftLexicalLookup, while a change to SwiftLexicalLookup can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftParser uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftParser, while a change to SwiftParser can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftParser uses a module listed above it, which is the healthy direction.
209 pairs of types, where a type in SwiftParser uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
1 pair of types, where a type in SwiftParser uses a type in SwiftLexicalLookup.
The types involved
SwiftParser.Cursor → SwiftLexicalLookup.Result
Direction
SwiftParser uses SwiftLexicalLookup, so a change to SwiftLexicalLookup can break SwiftParser, while a change to SwiftParser can't break SwiftLexicalLookup.
Position
Below the diagonal: SwiftParser uses a module listed above it, which is the healthy direction.
11→12 SwiftParser uses SwiftIDEUtilspart of a loop✕
Connections
2 pairs of types, where a type in SwiftParser uses a type in SwiftIDEUtils.
The types involved
SwiftParser.Parser → SwiftIDEUtils.Argument
SwiftParser.Scalar → SwiftIDEUtils.Collection
Direction
SwiftParser uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftParser, while a change to SwiftParser can't break SwiftIDEUtils.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→15 SwiftParser uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
5 pairs of types, where a type in SwiftParser uses a type in SwiftCompilerPluginMessageHandling.
SwiftParser uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftParser, while a change to SwiftParser can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
11→16 SwiftParser uses SwiftBasicFormatpart of a loop✕
Connections
9 pairs of types, where a type in SwiftParser uses a type in SwiftBasicFormat.
SwiftParser uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftParser, while a change to SwiftParser can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftIDEUtils uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftIDEUtils, while a change to SwiftIDEUtils can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftIDEUtils uses a module listed above it, which is the healthy direction.
41 pairs of types, where a type in SwiftIDEUtils uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftIDEUtils uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftIDEUtils, while a change to SwiftIDEUtils can't break SwiftDiagnostics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→15 SwiftIDEUtils uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
4 pairs of types, where a type in SwiftIDEUtils uses a type in SwiftCompilerPluginMessageHandling.
SwiftIDEUtils uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftIDEUtils, while a change to SwiftIDEUtils can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
12→16 SwiftIDEUtils uses SwiftBasicFormatpart of a loop✕
Connections
7 pairs of types, where a type in SwiftIDEUtils uses a type in SwiftBasicFormat.
SwiftIDEUtils uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftIDEUtils, while a change to SwiftIDEUtils can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftDiagnostics uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftDiagnostics, while a change to SwiftDiagnostics can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftDiagnostics uses a module listed above it, which is the healthy direction.
SwiftDiagnostics uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftDiagnostics, while a change to SwiftDiagnostics can't break SwiftIDEUtils.
Position
Below the diagonal: SwiftDiagnostics uses a module listed above it, which is the healthy direction.
13→15 SwiftDiagnostics uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
15 pairs of types, where a type in SwiftDiagnostics uses a type in SwiftCompilerPluginMessageHandling.
SwiftDiagnostics uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftDiagnostics, while a change to SwiftDiagnostics can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→16 SwiftDiagnostics uses SwiftBasicFormatpart of a loop✕
Connections
3 pairs of types, where a type in SwiftDiagnostics uses a type in SwiftBasicFormat.
SwiftDiagnostics uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftDiagnostics, while a change to SwiftDiagnostics can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
13→23 SwiftDiagnostics uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
3 pairs of types, where a type in SwiftDiagnostics uses a type in CodeGeneration~SyntaxSupport.
SwiftDiagnostics uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftDiagnostics, while a change to SwiftDiagnostics can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftParserDiagnostics uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftParserDiagnostics uses a module listed above it, which is the healthy direction.
SwiftParserDiagnostics uses repository, so a change to repository can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break repository.
Position
Below the diagonal: SwiftParserDiagnostics uses a module listed above it, which is the healthy direction.
142 pairs of types, where a type in SwiftParserDiagnostics uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftParserDiagnostics uses SwiftSyntax, so a change to SwiftSyntax can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftSyntax.
Position
Below the diagonal: SwiftParserDiagnostics uses a module listed above it, which is the healthy direction.
53 pairs of types, where a type in SwiftParserDiagnostics uses a type in SwiftParser. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftParserDiagnostics uses SwiftParser, so a change to SwiftParser can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftParser.
Position
Below the diagonal: SwiftParserDiagnostics uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in SwiftParserDiagnostics uses a type in SwiftDiagnostics. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftParserDiagnostics uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftDiagnostics.
Position
Below the diagonal: SwiftParserDiagnostics uses a module listed above it, which is the healthy direction.
14→15 SwiftParserDiagnostics uses SwiftCompilerPluginMessageHandlingpart of a loop✕
Connections
13 pairs of types, where a type in SwiftParserDiagnostics uses a type in SwiftCompilerPluginMessageHandling.
SwiftParserDiagnostics uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftCompilerPluginMessageHandling.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→16 SwiftParserDiagnostics uses SwiftBasicFormatpart of a loop✕
Connections
4 pairs of types, where a type in SwiftParserDiagnostics uses a type in SwiftBasicFormat.
SwiftParserDiagnostics uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
14→23 SwiftParserDiagnostics uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftParserDiagnostics uses a type in CodeGeneration~SyntaxSupport.
SwiftParserDiagnostics uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftParserDiagnostics, while a change to SwiftParserDiagnostics can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
53 pairs of types, where a type in SwiftCompilerPluginMessageHandling uses a type in SwiftSyntaxBuilder. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftCompilerPluginMessageHandling uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftSyntaxMacros, so a change to SwiftSyntaxMacros can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftSyntaxMacros.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses repository, so a change to repository can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break repository.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftOperators, so a change to SwiftOperators can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftOperators.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftSyntaxMacroExpansion, so a change to SwiftSyntaxMacroExpansion can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftSyntaxMacroExpansion.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in SwiftCompilerPluginMessageHandling uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftCompilerPluginMessageHandling uses SwiftSyntax, so a change to SwiftSyntax can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftSyntax.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftIfConfig, so a change to SwiftIfConfig can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftIfConfig.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
54 pairs of types, where a type in SwiftCompilerPluginMessageHandling uses a type in SwiftParser. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftCompilerPluginMessageHandling uses SwiftParser, so a change to SwiftParser can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftParser.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftIDEUtils, so a change to SwiftIDEUtils can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftIDEUtils.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftDiagnostics, so a change to SwiftDiagnostics can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftDiagnostics.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
SwiftCompilerPluginMessageHandling uses SwiftParserDiagnostics, so a change to SwiftParserDiagnostics can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftParserDiagnostics.
Position
Below the diagonal: SwiftCompilerPluginMessageHandling uses a module listed above it, which is the healthy direction.
15→16 SwiftCompilerPluginMessageHandling uses SwiftBasicFormatpart of a loop✕
Connections
27 pairs of types, where a type in SwiftCompilerPluginMessageHandling uses a type in SwiftBasicFormat. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SwiftCompilerPluginMessageHandling uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break SwiftBasicFormat.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
15→23 SwiftCompilerPluginMessageHandling uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftCompilerPluginMessageHandling uses a type in CodeGeneration~SyntaxSupport.
SwiftCompilerPluginMessageHandling uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftCompilerPluginMessageHandling, while a change to SwiftCompilerPluginMessageHandling can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
SwiftBasicFormat uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftBasicFormat, while a change to SwiftBasicFormat can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftBasicFormat uses a module listed above it, which is the healthy direction.
SwiftBasicFormat uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftBasicFormat, while a change to SwiftBasicFormat can't break SwiftCompilerPluginMessageHandling.
Position
Below the diagonal: SwiftBasicFormat uses a module listed above it, which is the healthy direction.
SwiftCompilerPlugin uses SwiftSyntax, so a change to SwiftSyntax can break SwiftCompilerPlugin, while a change to SwiftCompilerPlugin can't break SwiftSyntax.
Position
Below the diagonal: SwiftCompilerPlugin uses a module listed above it, which is the healthy direction.
SwiftCompilerPlugin uses SwiftParser, so a change to SwiftParser can break SwiftCompilerPlugin, while a change to SwiftCompilerPlugin can't break SwiftParser.
Position
Below the diagonal: SwiftCompilerPlugin uses a module listed above it, which is the healthy direction.
SwiftCompilerPlugin uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftCompilerPlugin, while a change to SwiftCompilerPlugin can't break SwiftCompilerPluginMessageHandling.
Position
Below the diagonal: SwiftCompilerPlugin uses a module listed above it, which is the healthy direction.
SwiftLibraryPluginProvider uses SwiftSyntax, so a change to SwiftSyntax can break SwiftLibraryPluginProvider, while a change to SwiftLibraryPluginProvider can't break SwiftSyntax.
Position
Below the diagonal: SwiftLibraryPluginProvider uses a module listed above it, which is the healthy direction.
SwiftLibraryPluginProvider uses SwiftParser, so a change to SwiftParser can break SwiftLibraryPluginProvider, while a change to SwiftLibraryPluginProvider can't break SwiftParser.
Position
Below the diagonal: SwiftLibraryPluginProvider uses a module listed above it, which is the healthy direction.
SwiftLibraryPluginProvider uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break SwiftLibraryPluginProvider, while a change to SwiftLibraryPluginProvider can't break SwiftCompilerPluginMessageHandling.
Position
Below the diagonal: SwiftLibraryPluginProvider uses a module listed above it, which is the healthy direction.
CodeGeneration~Utils uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break CodeGeneration~Utils, while a change to CodeGeneration~Utils can't break SwiftSyntaxBuilder.
Position
Below the diagonal: CodeGeneration~Utils uses a module listed above it, which is the healthy direction.
CodeGeneration~Utils uses SwiftSyntax, so a change to SwiftSyntax can break CodeGeneration~Utils, while a change to CodeGeneration~Utils can't break SwiftSyntax.
Position
Below the diagonal: CodeGeneration~Utils uses a module listed above it, which is the healthy direction.
CodeGeneration~Utils uses SwiftBasicFormat, so a change to SwiftBasicFormat can break CodeGeneration~Utils, while a change to CodeGeneration~Utils can't break SwiftBasicFormat.
Position
Below the diagonal: CodeGeneration~Utils uses a module listed above it, which is the healthy direction.
SwiftParserCLI~swift-parser-cli uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftParserCLI~swift-parser-cli, while a change to SwiftParserCLI~swift-parser-cli can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftParserCLI~swift-parser-cli uses a module listed above it, which is the healthy direction.
SwiftParserCLI~swift-parser-cli uses SwiftSyntax, so a change to SwiftSyntax can break SwiftParserCLI~swift-parser-cli, while a change to SwiftParserCLI~swift-parser-cli can't break SwiftSyntax.
Position
Below the diagonal: SwiftParserCLI~swift-parser-cli uses a module listed above it, which is the healthy direction.
SwiftParserCLI~swift-parser-cli uses SwiftParser, so a change to SwiftParser can break SwiftParserCLI~swift-parser-cli, while a change to SwiftParserCLI~swift-parser-cli can't break SwiftParser.
Position
Below the diagonal: SwiftParserCLI~swift-parser-cli uses a module listed above it, which is the healthy direction.
SwiftParserCLI~swift-parser-cli uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftParserCLI~swift-parser-cli, while a change to SwiftParserCLI~swift-parser-cli can't break SwiftBasicFormat.
Position
Below the diagonal: SwiftParserCLI~swift-parser-cli uses a module listed above it, which is the healthy direction.
SwiftSyntaxDevUtils~swift-syntax-dev-utils uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break SwiftSyntaxDevUtils~swift-syntax-dev-utils, while a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can't break SwiftSyntaxBuilder.
Position
Below the diagonal: SwiftSyntaxDevUtils~swift-syntax-dev-utils uses a module listed above it, which is the healthy direction.
SwiftSyntaxDevUtils~swift-syntax-dev-utils uses SwiftSyntax, so a change to SwiftSyntax can break SwiftSyntaxDevUtils~swift-syntax-dev-utils, while a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can't break SwiftSyntax.
Position
Below the diagonal: SwiftSyntaxDevUtils~swift-syntax-dev-utils uses a module listed above it, which is the healthy direction.
SwiftSyntaxDevUtils~swift-syntax-dev-utils uses SwiftParser, so a change to SwiftParser can break SwiftSyntaxDevUtils~swift-syntax-dev-utils, while a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can't break SwiftParser.
Position
Below the diagonal: SwiftSyntaxDevUtils~swift-syntax-dev-utils uses a module listed above it, which is the healthy direction.
SwiftSyntaxDevUtils~swift-syntax-dev-utils uses SwiftBasicFormat, so a change to SwiftBasicFormat can break SwiftSyntaxDevUtils~swift-syntax-dev-utils, while a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can't break SwiftBasicFormat.
Position
Below the diagonal: SwiftSyntaxDevUtils~swift-syntax-dev-utils uses a module listed above it, which is the healthy direction.
21→23 SwiftSyntaxDevUtils~swift-syntax-dev-utils uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
1 pair of types, where a type in SwiftSyntaxDevUtils~swift-syntax-dev-utils uses a type in CodeGeneration~SyntaxSupport.
SwiftSyntaxDevUtils~swift-syntax-dev-utils uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break SwiftSyntaxDevUtils~swift-syntax-dev-utils, while a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
CodeGeneration~generate-swift-syntax uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break SwiftSyntaxBuilder.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in CodeGeneration~generate-swift-syntax uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
CodeGeneration~generate-swift-syntax uses SwiftSyntax, so a change to SwiftSyntax can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break SwiftSyntax.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
CodeGeneration~generate-swift-syntax uses SwiftParser, so a change to SwiftParser can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break SwiftParser.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
CodeGeneration~generate-swift-syntax uses SwiftIDEUtils, so a change to SwiftIDEUtils can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break SwiftIDEUtils.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
CodeGeneration~generate-swift-syntax uses CodeGeneration~Utils, so a change to CodeGeneration~Utils can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break CodeGeneration~Utils.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
CodeGeneration~generate-swift-syntax uses SwiftSyntaxDevUtils~swift-syntax-dev-utils, so a change to SwiftSyntaxDevUtils~swift-syntax-dev-utils can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break SwiftSyntaxDevUtils~swift-syntax-dev-utils.
Position
Below the diagonal: CodeGeneration~generate-swift-syntax uses a module listed above it, which is the healthy direction.
22→23 CodeGeneration~generate-swift-syntax uses CodeGeneration~SyntaxSupportpart of a loop✕
Connections
9 pairs of types, where a type in CodeGeneration~generate-swift-syntax uses a type in CodeGeneration~SyntaxSupport.
CodeGeneration~generate-swift-syntax uses CodeGeneration~SyntaxSupport, so a change to CodeGeneration~SyntaxSupport can break CodeGeneration~generate-swift-syntax, while a change to CodeGeneration~generate-swift-syntax can't break CodeGeneration~SyntaxSupport.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
CodeGeneration~SyntaxSupport uses SwiftSyntaxBuilder, so a change to SwiftSyntaxBuilder can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break SwiftSyntaxBuilder.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses repository, so a change to repository can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break repository.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in CodeGeneration~SyntaxSupport uses a type in SwiftSyntax. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
CodeGeneration~SyntaxSupport uses SwiftSyntax, so a change to SwiftSyntax can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break SwiftSyntax.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses SwiftParser, so a change to SwiftParser can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break SwiftParser.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses SwiftCompilerPluginMessageHandling, so a change to SwiftCompilerPluginMessageHandling can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break SwiftCompilerPluginMessageHandling.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses SwiftBasicFormat, so a change to SwiftBasicFormat can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break SwiftBasicFormat.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses CodeGeneration~Utils, so a change to CodeGeneration~Utils can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break CodeGeneration~Utils.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
CodeGeneration~SyntaxSupport uses CodeGeneration~generate-swift-syntax, so a change to CodeGeneration~generate-swift-syntax can break CodeGeneration~SyntaxSupport, while a change to CodeGeneration~SyntaxSupport can't break CodeGeneration~generate-swift-syntax.
Position
Below the diagonal: CodeGeneration~SyntaxSupport uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
15
High / Critical
A03:2025 — Software Supply Chain Failures
4
Medium
Roadmap
Begin by resolving the three static analysis findings related to mutable job containers in the pull request and release workflows. Next, address the supply chain gaps by implementing artifact signing, establishing build provenance, and pinning build actions to ensure integrity. Finally, improve architectural governance by creating the missing architecture decision records.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 17
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 476
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 772
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 34
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 41 of 41 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 41 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1243 of 1265 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo. In the meantime, commit (or publish into the working tree) the lcov/Cobertura report your CI produces and the real number is read on the next scan. You can widen what we reach: optional: commit the lcov/Cobertura report your CI produces, and the real number is read on the next scan.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 8 SwiftPM declaration(s) across 5 `Package.swift` and 0 committed pin(s) were read for PINNING discipline (3 defect(s) reported), but the outdated signal comes from listing each declared repository's release tags rather than from a registry, and none of them resolved to a version to compare, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (Package.swift), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `CodeGeneration/Sources/SyntaxSupport/Child.swift`, `CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift`, `CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift`, `CodeGeneration/Sources/generate-swift-syntax/InitSignature+Extensions.swift`, `CodeGeneration/Sources/generate-swift-syntax/templates/swiftparser/LanguageFeaturesFile.swift`, … (+72 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (EditorExtension/SwiftRefactorExtension.xcodeproj/project.pbxproj). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Swift, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Swift, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads EF Core usage in C# and the schema tooling its file scan recognises only, and no .NET project was loaded, and this repository's language is not one the scan models, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Rust or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust and Dart source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Ruby, Python, Go, Rust or Dart was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, TypeScript/JavaScript, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded, and this repository's C, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart and Ruby source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Scala, PHP, Erlang, Python, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's C is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Scala, JavaScript/TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart and Ruby source only, and no C# was loaded and no Scala, JavaScript, TypeScript, Java, Kotlin, Python, PHP, Go, Rust, Dart or Ruby was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
64 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was IfConfigEvaluation.swift.evaluateIfConfig at 91. A further 17 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SyntaxNodeKind.deprecatedRawValue at 70 — they are counted neither in the figure above nor in this dimension's score. 7 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift (SyntaxNodeKind.deprecatedRawValue at 70), Sources/SwiftIDEUtils/SyntaxClassification.swift (RawTokenKind.classification at 52), Sources/SwiftSyntax/TokenDiagnostic.swift (Kind.severity at 40), Sources/SwiftIfConfig/IfConfigDiagnostic.swift (IfConfigDiagnostic.description at 23), Sources/SwiftParser/TokenPrecedence.swift (TokenPrecedence.init at 17), and 2 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 59 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with IfConfigEvaluation.swift.evaluateIfConfig (cyclomatic 91), Scalar.isValidIdentifierContinuationCodePoint (cyclomatic 86). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 6.1 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 106 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cognitive Complexity — start with IfConfigEvaluation.swift.evaluateIfConfig (cognitive 134), Scalar.isValidIdentifierContinuationCodePoint (cognitive 85), RawSyntaxNodesFile.swift.rawSyntaxNodesFile (cognitive 83). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 4.8 to about 6.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.5 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 14 FileTooLong finding(s) in God Classes — start with Expressions.swift, Declarations.swift, Cursor.swift. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 9 TooManyMethods finding(s) in God Classes — start with JSONDecoding.swift (2), Parser.swift, ParseDiagnosticsGenerator.swift. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 8 MethodTooLong finding(s) in God Classes — start with Declarations.swift (2), Types.swift (2), TokenPrecedence.swift. — One of this dimension's main actionable groups (8 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
75 duplicated block group(s) detected. A further 7 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 8 of the 82 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 42 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with Assertions.swift (2), DeclGroupLookup.swift, Names.swift. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with TypeDeclSyntax.swift, Cursor.swift, ParseDiagnosticsGenerator.swift. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Duplicated block (14 lines × 2) finding(s) in Code Duplication — start with SwiftSyntaxCompatibility.swift (2), Types.swift, MacroSystem.swift. — One of this dimension's main actionable groups (4 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.3 / 10Stronggated by 3 serious findings✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
38 production modules (SwiftPM+Xcode+Bazel), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 2 module(s) off the main sequence, with abstractness counted on 23 of the 38 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: SyntaxSupport · ×2
Unstable project SwiftSyntaxMacroExpansion
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Unstable project SwiftSyntaxMacroExpansion finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with JSONDecoding.swift (2), IsValidIdentifier.swift, MacroArgument.swift. — One of this dimension's main actionable groups (8 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
880 test methods: 880 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.1 / 10Stronggated by 48 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
10 skipped (1 with a documented reason), 710 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 880 tests (12 harness-style project(s) excluded from the assertion penalty).
No assertions: testLogicalExprs · ×38Tests/SwiftOperatorsTest/OperatorTableTests.swift:114
Test project verifies nothing: SwiftSyntaxMacrosTestSupportTestsTests/SwiftSyntaxMacrosTestSupportTests/AssertionsTests.swift:68
No direct assertions: testNotIndented · ×672Tests/SwiftBasicFormatTest/BasicFormatTests.swift:56
Test project verifies nothing: MacroExamples · ×3Examples/Tests/MacroExamples/Implementation/Accessor/EnvironmentValueMacroTests.swift:21
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 38 No assertions finding(s) in Test Quality — start with SyntaxCollectionsTests.swift (11), SourceLocationConverterTests.swift (9), OperatorTableTests.swift (6). — One of this dimension's main actionable groups (38 warning-level).
Resolve the 9 Skipped test finding(s) in Test Quality — start with VisitorPerformanceTests.swift (3), MemoryLayoutTest.swift (3), AccessorPerformanceTests.swift. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 1 Test project verifies nothing finding(s) in Test Quality — start with AssertionsTests.swift. — One of this dimension's main actionable groups (1 warning-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 2 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 0 of them read from the licence file the repository carries at the revision Package.resolved pins, and 2 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed Package.resolved pins, direct and transitive, and every declared dependency none pins. 4 of them are declared by a manifest that commits no Package.resolved (a library, whose resolution is its consumer's), so their own dependencies are resolved by whoever builds it and are not in this verdict.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with Cursor.swift, Expressions.swift, JSONDecoding.swift. — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.5 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
38 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift. Counted over 249 of the 387 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
97 deducted task-comment markers across 87282 LoC (0.1/KLoC) → score 9.8. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 50 TodoComment finding(s) in Explicit Debt — start with SyntaxProtocol.swift (4), RecoveryTests.swift (3), CallToTrailingClosureTests.swift (2). — One of this dimension's main actionable groups (50 warning-level).
Resolve the 47 FixmeComment finding(s) in Explicit Debt — start with AttributeRemoverTests.swift (5), ModuleSelectorTests.swift (5), OperatorTable+Folding.swift (3). — One of this dimension's main actionable groups (47 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
1 of 5 build units (SwiftPM, Xcode) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
15 finding(s): 0 critical, 15 high, 0 medium, 0 low. 11 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `Sources/_SwiftSyntaxCShims/include/Atomics.h` (line 24, line 27, line 33, …) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
No action in Static Analysis (SAST) — all 7 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (7 issue-level, 0 of them charged here).
No action in Static Analysis (SAST) — all 4 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (4 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
75 of 249 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is CodeGeneration/Sources/SyntaxSupport/Child.swift. Counted over 249 of the 387 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 75 Orphaned file finding(s) in Knowledge Freshness — start with Utils.swift (2), AssertEqualWithDiff.swift (2), Child.swift. — One of this dimension's main actionable groups (75 recommendation-level).
Resolve the 1 Orphaned files with no living knowledge finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with AttributeNodes.swift, SyntaxRewriterFile.swift. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 Change coupling finding(s) in Change Coupling — start with SyntaxRewriterFile.swift, SyntaxChildren.swift, Cursor.swift. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with SyntaxUtils.swift. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
275 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Review the README against recent changes; refresh the parts that drifted.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Only 1/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `CodeGeneration`, `EditorExtension`, `SwiftParserCLI`, `SwiftSyntaxDevUtils`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 10084 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 26 use(s) across 90,497 production line(s) (~0.3/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Swift: on hot paths, reserveCapacity before appending, use ContiguousArray for class-element arrays, work in place with withUnsafeBufferPointer/withUnsafeTemporaryAllocation, and make large values ~Copyable with borrowing/consuming parameters.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/Utils.swift:40, SwiftParserCLI/Sources/swift-parser-cli/Commands/Reduce.swift:126
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 74 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D12 Dependency Hygiene — Not scored — 8 SwiftPM declaration(s) across 5 `Package.swift` and 0 committed pin(s) were read for PINNING discipline (3 defect(s) reported), but the outdated signal comes from listing each declared repository's release tags rather than from a registry, and none of them resolved to a version to compare, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
D21 Naming Consistency — Naming consistency is measured on C# only; Swift not measured.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.swift), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Swift Package.swift/Package.resolved — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 77 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Swift Package.swift/Package.resolved — not scanned yet).
D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not measured — Swift suite
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Swift source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `swift test --enable-code-coverage` (SwiftPM) or `xcodebuild test -scheme <YourScheme> -enableCodeCoverage YES` (an .xcodeproj/.xcworkspace suite), then `xcrun llvm-cov export -format=lcov`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X13 Undrained process stream — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X15 Unvalidated length from an untrusted reader — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X19 Unrestored process-global state — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X21 Side-effecting pattern guard — Not applicable: this check looks for a pattern guard or `case` label that increments, decrements or assigns while the switch is deciding whether it matches, and in this repository's languages none can. In C a `case` label must be a constant expression, and a switch has no guards, so no label can change state. Swift has no `++` or `--`, and an assignment yields `()`, which cannot be an operand of `&&`, `||` or `?:` nor the Bool a `case … where` clause needs. Not a gap in the analyzer and not a finding about your code.
X22 Contradicted release guard — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X23 Unguarded diagnostic materialisation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X24 Document value interpolated into markup unescaped — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X25 Inert configuration knob — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X27 Collection changed while being enumerated — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Boundary-crossing change coupling: AttributeNodes.swift ↔ Attributes.swift CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift:1— `CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift` (context CodeGeneration) and `Sources/SwiftParser/Attributes.swift` (context Sources) sit in DIFFERENT parts of the tree yet change together 52% of the time (13 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `22c58ece` Parse the 'exported:' argument of the '@specialized' attribute; `7b1c508f` [SE-0537] Parse @section(default); `d754c2db` Add support for SE-0460 @specialized — run `git show` on any of them.
Boundary-crossing change coupling: SyntaxRewriterFile.swift ↔ SyntaxCollection.swift CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift:1— `CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift` (context CodeGeneration) and `Sources/SwiftSyntax/SyntaxCollection.swift` (context Sources) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `d9882f05` [NFC] Rename 'arena:' argument labels; `4dbdae7c` Revert "Revert "[Syntax] Use BumpPtrAllocator for Syntax node interna…; `71e1cee4` Revert "[Syntax] Use BumpPtrAllocator for Syntax node internals" — run `git show` on any of them.
TodoComment Package.swift:439— // TODO: Should be included in SwiftParserTest/SwiftSyntaxTest — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftRefactorTest/CallToTrailingClosureTests.swift:82— // TODO: The ident here is not great. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftRefactorTest/CallToTrailingClosureTests.swift:112— // TODO: BasicFormat is pretty messed up here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftRefactorTest/ExpandEditorPlaceholderTests.swift:179— // TODO: Should we remove whitespace from the merged trivia? The space — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/DeclarationTests.swift:1274— // TODO: Enable after fixits would be added — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/DeprecatedWhereTests.swift:17— // TODO: The generic where clause next to generic parameters is only valid in language mode 4. We should disallow them in language mode 5. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/ForwardSlashRegexSkippingTests.swift:331— // TODO: Old parser had a fix-it to add backslash to escape — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:2253— // TODO: Add equivalent test case for legacy parser — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:2262— // TODO: Add equivalent test case for legacy parser — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/OperatorDeclDesignatedTypesTests.swift:17— // TODO: Designated operator types are only valid in langauge mode 4. We should disallow them in language mode 5. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/RecoveryTests.swift:444— // TODO: Old parser expected error on line 2: missing condition in 'while' statement — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/RecoveryTests.swift:445— // TODO: Old parser expected error on line 2: consecutive statements on a line must be separated by ';', Fix-It replacements: 10 - 10 = ';' — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/RecoveryTests.swift:446— // TODO: Old parser expected warning on line 2: result of call to closure returning 'Bool' is unused — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/TrailingClosuresTests.swift:201— // TODO: The diagnostics here are perhaps a little overboard. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftParserTest/translated/TrailingClosuresTests.swift:231— // TODO: The diagnostics here are perhaps a little overboard. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftLexicalLookupTest/ValueDeclTests.swift:37— // TODO: Should this be moved into a 'Utilities' file? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftLexicalLookupTest/ValueDeclTests.swift:567— // TODO: Implement — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:274— // TODO: Implement — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftLexicalLookup/QualifiedLookup/ModuleLookup.swift:18— // TODO: Implement — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftDiagnosticsTest/DiagnosticTestingUtils.swift:69— // TODO: How to create an abstract model for this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Tests/SwiftDiagnosticsTest/DiagnosticTestingUtils.swift:75— // TODO: How to create an abstract model for this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftSyntaxBuilder/Syntax+StringInterpolation.swift:264— // TODO: Use a multi-line literal if there are more than N inner newlines. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftSyntax/SyntaxProtocol.swift:553— // TODO: Should only need one new node here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftSyntax/SyntaxProtocol.swift:560— // TODO: Should only need one new node here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment Sources/SwiftSyntax/SyntaxProtocol.swift:573— // TODO: We shouldn't need to create to copies just to get the trimmed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:206— // FIXME: The current parser handles this fine but it’s a really bogus filename. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/AttributeRemoverTests.swift:62— // FIXME: `AttributeRemover` should not leave a leading newline. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/AttributeRemoverTests.swift:73— // FIXME: `AttributeRemover` should not leave a leading newline. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/AttributeRemoverTests.swift:169— // FIXME: `AttributeRemover` should not leave a leading newline. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/AttributeRemoverTests.swift:342— // FIXME: `AttributeRemover` should not leave a leading newline. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/AttributeRemoverTests.swift:370— // FIXME: `AttributeRemover` should not leave a leading newline. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/BodyMacroTests.swift:34— // FIXME: Should be able to support (de-)initializers and accessors as — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/PreambleMacroTests.swift:34— // FIXME: Should be able to support (de-)initializers and accessors as — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/LexicalContextTests.swift:84— // FIXME: Can we abstract over these? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/LexicalContextTests.swift:136— // FIXME: It would be nice to be able to switch on type syntax... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftSyntaxMacroExpansionTest/PeerMacroTests.swift:105— // FIXME: We should make CodeBlockSyntax ExpressibleByStringInterpolation, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:118— // FIXME: We should make CodeBlockSyntax ExpressibleByStringInterpolation, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/DeclarationTests.swift:1198— // FIXME: spacing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/ExpressionTypeTests.swift:23— // FIXME: This is suboptimal. Instead, we should verify that 'canParseType()' — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/ExpressionTypeTests.swift:68— // FIXME: 'canParseType' cannot handle these. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:182— // FIXME: Add tests with autodiff @_differentiable(jvp:vjp:) and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:221— // FIXME: Can we test @convention(witness_method:)? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:724— // FIXME: Function call??? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:1337— // FIXME: This gets interpreted as a single `.*` operator; may not be ideal. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/ModuleSelectorTests.swift:1577— // FIXME: This gets interpreted as a single `.*` operator; may not be ideal. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftParserTest/translated/RecoveryTests.swift:3422— // FIXME: expected *declaration* after attribute — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftLexicalLookupTest/ValueDeclTests.swift:437— // FIXME: Compiler surfaces "invalid_token" as the argument name. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Tests/SwiftIfConfigTest/VisitorTests.swift:89— // FIXME: Should the above be an IdentifiedDeclSyntax? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift:309— // FIXME: Do real call-argument matching between the argument list and the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment Sources/SwiftRefactor/PackageManifest/PackageTarget.swift:108— // FIXME: pluginCapability — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
No assertions: testLogicalExprs Tests/SwiftOperatorsTest/OperatorTableTests.swift:114— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAssignExprs Tests/SwiftOperatorsTest/OperatorTableTests.swift:138— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testCastExprs Tests/SwiftOperatorsTest/OperatorTableTests.swift:144— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testArrowExpr Tests/SwiftOperatorsTest/OperatorTableTests.swift:150— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testTernaryExpr Tests/SwiftOperatorsTest/OperatorTableTests.swift:387— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testTryAwait Tests/SwiftOperatorsTest/OperatorTableTests.swift:395— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testIsValidIdentifier Tests/SwiftParserTest/IsValidIdentifierTests.swift:54— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAssertMacroExpansionIgnoresHighlightMatchingIfNil Tests/SwiftSyntaxMacrosTestSupportTests/AssertionsTests.swift:68— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAssertMacroExpansionMatchesSingleStringHighlight Tests/SwiftSyntaxMacrosTestSupportTests/AssertionsTests.swift:79— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAssertMacroExpansionMatchesArrayHighlight Tests/SwiftSyntaxMacrosTestSupportTests/AssertionsTests.swift:91— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testRecursion Tests/SwiftSyntaxTest/AbsolutePositionTests.swift:18— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testEveryUnexpectedSlotOfANode Tests/SwiftSyntaxTest/CompactLayoutTests.swift:97— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDump Tests/SwiftSyntaxTest/DebugDescriptionTests.swift:26— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDebugInitCall Tests/SwiftSyntaxTest/DebugDescriptionTests.swift:174— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testInvalidUtf8 Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:38— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testSingleSourceLocationDirective Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:68— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMultipleSourceLocationDirectives Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:111— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testResetSourceLocationDirective Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:137— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testHexLineNumber Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:151— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testStringInterpolationInFilename Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:164— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMultiLineDirective Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:177— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testDirectiveWithTrailingBlockComment Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:192— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testMultiLineStringLiteralAsFilename Tests/SwiftSyntaxTest/SourceLocationConverterTests.swift:205— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAppendElement Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift:60— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testAppendMultipleElement Tests/SwiftSyntaxTest/SyntaxCollectionsTests.swift:70— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
FileTooLong: SwiftParser/Expressions.swift Sources/SwiftParser/Expressions.swift— FileTooLong — 1817 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1317 over it, 3.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftParser/Declarations.swift Sources/SwiftParser/Declarations.swift— FileTooLong — 1633 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1133 over it, 3.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Lexer/Cursor.swift Sources/SwiftParser/Lexer/Cursor.swift— FileTooLong — 1631 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1131 over it, 3.26× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift— FileTooLong — 1418 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ParseDiagnosticsGenerator (83-2239). The bar is 500 significant lines; this is 918 over it, 2.84× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: SwiftParser/Types.swift Sources/SwiftParser/Types.swift— FileTooLong — 1055 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 555 over it, 2.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: JSON/JSONDecoding.swift Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift— FileTooLong — 953 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 453 over it, 1.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftSyntaxMacroExpansion/MacroSystem.swift Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift— FileTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 429 over it, 1.86× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftParser/Attributes.swift Sources/SwiftParser/Attributes.swift— FileTooLong — 896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 396 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Raw/RawSyntax.swift Sources/SwiftSyntax/Raw/RawSyntax.swift— FileTooLong — 890 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 390 over it, 1.78× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftSyntax/SwiftSyntaxCompatibility.swift Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift— FileTooLong — 872 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 372 over it, 1.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftParser/Statements.swift Sources/SwiftParser/Statements.swift— FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 201 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: SwiftParser/Specifiers.swift Sources/SwiftParser/Specifiers.swift— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Scopes/ScopeImplementations.swift Sources/SwiftLexicalLookup/Scopes/ScopeImplementations.swift— FileTooLong — 558 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 58 over it, 1.12× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: TypeLookup/TypeResolver.swift Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift— FileTooLong — 541 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 41 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Hotspot: Sources/SwiftParser/Lexer/Cursor.swift Sources/SwiftParser/Lexer/Cursor.swift:577— Sources/SwiftParser/Lexer/Cursor.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Cursor.nextToken at line 577. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftParser/Lexer/Cursor.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftParser/Expressions.swift Sources/SwiftParser/Expressions.swift:260— Sources/SwiftParser/Expressions.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Parser.parseSequenceExpressionOperator at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftParser/Expressions.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:404— Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in JSONScanner.scanNonASCIIScalar at line 404. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:583— Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in TypeResolver.resolveNominalTypeDecl at line 583. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftParser/Declarations.swift Sources/SwiftParser/Declarations.swift:2060— Sources/SwiftParser/Declarations.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Parser.parsePrecedenceGroupAttributeListSyntax at line 2060. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftParser/Declarations.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift:163— Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in Attached.partiallyResolve at line 163. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftParser/Attributes.swift Sources/SwiftParser/Attributes.swift:260— Sources/SwiftParser/Attributes.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Parser.parseAttribute at line 260. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftParser/Attributes.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftParser/TokenSpecSet.swift Sources/SwiftParser/TokenSpecSet.swift:297— Sources/SwiftParser/TokenSpecSet.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in PureDeclarationKeyword.init at line 297. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftParser/TokenSpecSet.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift:32— CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ExperimentalFeature.featureName at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift:18— CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in RawSyntaxNodesFile.swift.rawSyntaxNodesFile at line 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftSyntax/SyntaxProtocol.swift Sources/SwiftSyntax/SyntaxProtocol.swift:646— Sources/SwiftSyntax/SyntaxProtocol.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SyntaxProtocol.debugWrite at line 646. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftSyntax/SyntaxProtocol.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:127— Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in DeclGroupLookup.swift._visitDirectMembersOfDecl at line 127. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-30..2026-10-28, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-30 01:37:01 -07:00' --until='2026-10-28 01:37:01 -07:00' --full-history --no-merges -- Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
TooManyMethods: Parser Sources/SwiftParser/Parser.swift:89— TooManyMethods — 296 methods, declared across 23 files: SwiftParser/Expressions.swift (51), SwiftParser/Declarations.swift (39), SwiftParser/Parser.swift (37), SwiftParser/Types.swift (28), +19 more file(s). The bar is 30 methods; this is 266 over it, 9.87× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ParseDiagnosticsGenerator Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:83— TooManyMethods — 86 methods, declared across 3 files: SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift (80), SwiftParserDiagnostics/MissingTokenError.swift (5), SwiftParserDiagnostics/MissingNodesError.swift (1). The bar is 30 methods; this is 56 over it, 2.87× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TokenSyntax Sources/SwiftSyntax/TokenSyntax.swift:23— TooManyMethods — 71 methods, declared across 4 files: generated/Tokens.swift (51), SwiftSyntax/SwiftSyntaxCompatibility.swift (13), SwiftSyntax/TokenSyntax.swift (6), SwiftSyntaxBuilder/Syntax+StringInterpolation.swift (1). The bar is 30 methods; this is 41 over it, 2.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Cursor Sources/SwiftParser/TriviaParser.swift:138— TooManyMethods — 70 methods, declared across 3 files: Lexer/Cursor.swift (61), Lexer/RegexLiteralLexer.swift (6), SwiftParser/TriviaParser.swift (3). The bar is 30 methods; this is 40 over it, 2.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Lookahead Sources/SwiftParser/Attributes.swift:1169— TooManyMethods — 60 methods, declared across 10 files: SwiftParser/Lookahead.swift (17), SwiftParser/Types.swift (16), SwiftParser/Expressions.swift (7), SwiftParser/Recovery.swift (5), +6 more file(s). The bar is 30 methods; this is 30 over it, 2.00× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: KeyedContainer Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:1214— TooManyMethods — 42 methods, declared across 2 files: JSON/JSONDecoding.swift (23), JSON/JSONEncoding.swift (19). The bar is 30 methods; this is 12 over it, 1.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: UnkeyedContainer Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:1354— TooManyMethods — 41 methods, declared across 2 files: JSON/JSONDecoding.swift (24), JSON/JSONEncoding.swift (17). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Trivia Sources/SwiftSyntax/Trivia.swift:30— TooManyMethods — 40 methods, declared across 10 files: generated/TriviaPieces.swift (14), SwiftSyntax/Trivia.swift (12), SwiftBasicFormat/Trivia+FormatExtensions.swift (4), SyntaxSupport/Utils.swift (2), +6 more file(s). The bar is 30 methods; this is 10 over it, 1.33× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RawSyntax Sources/SwiftSyntax/Raw/RawSyntax.swift:388— TooManyMethods — 33 methods, declared across 3 files: Raw/RawSyntax.swift (29), Raw/RawSyntaxNodeProtocol.swift (3), SwiftSyntax/SourceLocation.swift (1). The bar is 30 methods; this is 3 over it, 1.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: Parser.parseGenericWhereClause Sources/SwiftParser/Declarations.swift:714— MethodTooLong — parseGenericWhereClause runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TokenPrecedence.init Sources/SwiftParser/TokenPrecedence.swift:187— MethodTooLong — init runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BasicFormat.visit Sources/SwiftBasicFormat/BasicFormat.swift:439— MethodTooLong — visit runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Parser.parseUnsuppressedSimpleType Sources/SwiftParser/Types.swift:316— MethodTooLong — parseUnsuppressedSimpleType runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Parser.parseSimpleOrCompositionType Sources/SwiftParser/Types.swift:111— MethodTooLong — parseSimpleOrCompositionType runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Parser.parseStringLiteral Sources/SwiftParser/StringLiterals.swift:499— MethodTooLong — parseStringLiteral runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TypeResolver.resolveNominalTypeDecl Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:583— MethodTooLong — resolveNominalTypeDecl runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Parser.parsePrecedenceGroupAttributeListSyntax Sources/SwiftParser/Declarations.swift:2060— MethodTooLong — parsePrecedenceGroupAttributeListSyntax runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Low cohesion: UnkeyedContainer (LCOM4 19) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:1354— UnkeyedContainer's methods fall into 19 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 19 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: String (LCOM4 11) Sources/SwiftParser/IsValidIdentifier.swift:37— String's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: OnlyLiteralExprChecker (LCOM4 11) Sources/SwiftSyntaxMacroExpansion/MacroArgument.swift:37— OnlyLiteralExprChecker's methods fall into 11 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SymbolTable (LCOM4 9) Sources/SwiftLexicalLookup/TypeLookup/SymbolTable.swift:19— SymbolTable's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: KeyedContainer (LCOM4 7) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:1214— KeyedContainer's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Lookahead (LCOM4 7) Sources/SwiftParser/Attributes.swift:1169— Lookahead's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Range (LCOM4 6) Sources/SwiftIDEUtils/Utils.swift:15— Range's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ParameterReplacementVisitor (LCOM4 4) Sources/SwiftSyntaxMacroExpansion/MacroReplacement.swift:100— ParameterReplacementVisitor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (11 lines × 2) Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:35— Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:35-45 | Sources/SwiftLexicalLookup/QualifiedLookup/NominalTypeDeclSyntax.swift:47-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:46` calls `extensionDecl` and `Sources/SwiftLexicalLookup/QualifiedLookup/NominalTypeDeclSyntax.swift:58` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 2) Sources/SwiftParser/Names.swift:338— Sources/SwiftParser/Names.swift:338-348 | Sources/SwiftParser/Types.swift:414-424 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Names.swift:338` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/SwiftParser/Statements.swift:480— Sources/SwiftParser/Statements.swift:480-490 | Sources/SwiftParser/Statements.swift:602-612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:479— Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:479-489 | Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift:101-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:479` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift:53— Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift:53-63 | Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift:106-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxMacrosTestSupport/Assertions.swift:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:32— Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:32-38 | Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:70-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:32` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) Sources/SwiftParser/Lexer/Cursor.swift:54— Sources/SwiftParser/Lexer/Cursor.swift:54-60 | Sources/SwiftParser/Lexer/Cursor.swift:73-79 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1026— Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1026-1032 | Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:2003-2009 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1026` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) Sources/SwiftRefactor/PackageManifest/StringUtils.swift:181— Sources/SwiftRefactor/PackageManifest/StringUtils.swift:181-193 | Sources/SwiftRefactor/PackageManifest/StringUtils.swift:204-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/VerifySourceCode.swift:125— SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/VerifySourceCode.swift:125-131 | SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/VerifySourceCode.swift:145-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/VerifySourceCode.swift:132` calls `filter`, `hasPrefix` and `SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/VerifySourceCode.swift:152` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
ParseDiagnosticsGenerator.visit (cognitive 17) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:515— ParseDiagnosticsGenerator.visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDiagnosticsGenerator.visit (cognitive 17) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:745— ParseDiagnosticsGenerator.visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDiagnosticsGenerator.visit (cognitive 17) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:879— ParseDiagnosticsGenerator.visit has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 7 (8 pts) (nesting depth added 7). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ParseDiagnosticsGenerator.visit (cognitive 17) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:2114— ParseDiagnosticsGenerator.visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: IfConfigEvaluation.swift.evaluateIfConfig Sources/SwiftIfConfig/IfConfigEvaluation.swift:31— FunctionTooLong — evaluateIfConfig runs 308 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 208 over it, 3.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: RawSyntaxNodesFile.swift.rawSyntaxNodesFile CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift:18— FunctionTooLong — rawSyntaxNodesFile runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MacroExpansion.swift.expandAttachedMacroWithoutCollapsing Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift:251— FunctionTooLong — expandAttachedMacroWithoutCollapsing runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SyntaxNodesFile.swift.syntaxNode CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift:22— FunctionTooLong — syntaxNode runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (14 lines × 2) Sources/SwiftParser/Types.swift:150— Sources/SwiftParser/Types.swift:150-163 | Sources/SwiftParser/Types.swift:254-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Types.swift:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:502— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:502-515 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:582-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:502` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:518— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:518-531 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:597-610 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:518` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:782— Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:782-795 | Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:833-846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:782` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) Sources/SwiftParser/Expressions.swift:2564— Sources/SwiftParser/Expressions.swift:2564-2578 | Sources/SwiftParser/Expressions.swift:2641-2653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Expressions.swift:2564` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1457— Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1457-1469 | Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1490-1502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1457` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Sources/SwiftRefactor/PackageManifest/AddPluginUsage.swift:33— Sources/SwiftRefactor/PackageManifest/AddPluginUsage.swift:33-45 | Sources/SwiftRefactor/PackageManifest/AddTargetDependency.swift:51-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftRefactor/PackageManifest/AddPluginUsage.swift:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:23— Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:23-35 | Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:18-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/SwiftParser/Declarations.swift:556— Sources/SwiftParser/Declarations.swift:556-567 | Sources/SwiftParser/Nominals.swift:244-257 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Declarations.swift:556` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) Sources/SwiftParser/ParseSourceFile.swift:20— Sources/SwiftParser/ParseSourceFile.swift:20-31 | Sources/SwiftParser/ParseSourceFile.swift:37-48 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/ParseSourceFile.swift:20` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 2) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:713— Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:713-724 | Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:780-791 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:116— Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:116-127 | Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:104-115 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift:252— Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift:252-256 | Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift:269-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) Sources/SwiftParser/Lexer/Cursor.swift:1696— Sources/SwiftParser/Lexer/Cursor.swift:1696-1701 | Sources/SwiftParser/Lexer/Cursor.swift:1726-1730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Lexer/Cursor.swift:1696` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:25— Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:25-29 | Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:40-45 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step5.swift:27— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step5.swift:27-31 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift:27-31 — before extracting anything, compare `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step5.swift` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift` as WHOLE FILES: 96% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Change coupling: SyntaxRewriterFile.swift ↔ SyntaxVisitorFile.swift CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift:1— `CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift` and `CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxVisitorFile.swift` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `4dbdae7c` Revert "Revert "[Syntax] Use BumpPtrAllocator for Syntax node interna…; `71e1cee4` Revert "[Syntax] Use BumpPtrAllocator for Syntax node internals"; `b64f80d5` [Syntax] Use BumpPtrAllocator for Syntax node internals — run `git show` on any of them.
Change coupling: SyntaxChildren.swift ↔ SyntaxIdentifier.swift Sources/SwiftSyntax/SyntaxChildren.swift:1— `Sources/SwiftSyntax/SyntaxChildren.swift` and `Sources/SwiftSyntax/SyntaxIdentifier.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `4dbdae7c` Revert "Revert "[Syntax] Use BumpPtrAllocator for Syntax node interna…; `71e1cee4` Revert "[Syntax] Use BumpPtrAllocator for Syntax node internals"; `b64f80d5` [Syntax] Use BumpPtrAllocator for Syntax node internals — run `git show` on any of them.
Change coupling: Cursor.swift ↔ UnicodeScalarExtensions.swift Sources/SwiftParser/Lexer/Cursor.swift:1— `Sources/SwiftParser/Lexer/Cursor.swift` and `Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `6c7fc5ae` Parse raw identifiers.; `9f7ee9bd` UnicodeScalar operators.; `14e23d51` Display multi-byte unicode characters in lexer errors correctly — run `git show` on any of them.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:66— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:66-78 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:69-81 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift:38-50 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:46-58 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:56-68 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:64-76 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:502— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:502-540 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:542-580 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:582-619 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:621-661 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:663-703 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:705-744 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:23— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:23-62 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:64-103 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:105-143 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:145-184 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:186-225 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:227-265 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Duplicated block (40 lines × 2) Sources/SwiftParser/Declarations.swift:2258— Sources/SwiftParser/Declarations.swift:2258-2297 | Sources/SwiftParser/Expressions.swift:1486-1525 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Declarations.swift:2258` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (40 lines × 2) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:23— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:23-62 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:145-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (40 lines × 2) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:64— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:64-103 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:186-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (24 lines × 2) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:753— Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:753-776 | Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1391-1414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:753` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (24 lines × 2) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:240— Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:240-263 | Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:272-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:142— Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:142-165 | Sources/SwiftSyntaxMacrosGenericTestSupport/Assertions.swift:372-395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Sources/SwiftParser/Declarations.swift:1811— Sources/SwiftParser/Declarations.swift:1811-1820 | Sources/SwiftParser/Declarations.swift:2201-2210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) Sources/SwiftParser/Expressions.swift:883— Sources/SwiftParser/Expressions.swift:883-892 | Sources/SwiftParser/Expressions.swift:927-936 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Expressions.swift:883` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:105— Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:105-114 | Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:130-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:89— Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:89-97 | Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:176-184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) Sources/SwiftParser/Expressions.swift:2400— Sources/SwiftParser/Expressions.swift:2400-2408 | Sources/SwiftParser/Statements.swift:413-421 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:395— Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:395-403 | Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:432-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
ClassTooLong: ParseDiagnosticsGenerator Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:83— ClassTooLong — 1371 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 971 over it, 3.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SyntaxNodeKind CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift:20— ClassTooLong — 436 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 36 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (18 lines × 2) Sources/SwiftParser/Types.swift:190— Sources/SwiftParser/Types.swift:190-207 | Sources/SwiftParser/Types.swift:269-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Types.swift:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:105— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:105-122 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:227-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1471— Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1471-1487 | Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1504-1520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:1471` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 2) Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:167— Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:167-183 | Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:148-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:167` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (15–16 lines × 2) Sources/SwiftParser/Declarations.swift:1233— Sources/SwiftParser/Declarations.swift:1233-1248 | Sources/SwiftParser/Declarations.swift:1376-1390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:547— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:547-561 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:668-683 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:547` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:621— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:621-635 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:705-719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:621` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:638— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:638-652 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:721-735 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:638` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 6) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:66— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:66-78 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:69-81 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift:38-50 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:46-58 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:56-68 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:64-76 — before extracting anything, compare `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 6) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:37— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:37-49 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:78-90 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:118-130 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:159-171 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:200-212 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:240-252 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:37` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Off the main sequence: SyntaxSupport — SyntaxSupport: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: SwiftBasicFormat — SwiftBasicFormat: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Swallowed exception (caught, then discarded) SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/Utils.swift:40— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) SwiftParserCLI/Sources/swift-parser-cli/Commands/Reduce.swift:126— `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
IfConfigEvaluation.swift.evaluateIfConfig (cyclomatic 91) Sources/SwiftIfConfig/IfConfigEvaluation.swift:31— IfConfigEvaluation.swift.evaluateIfConfig has cyclomatic complexity 91 (threshold 15). Of this number, 80 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scalar.isValidIdentifierContinuationCodePoint (cyclomatic 86) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:14— Scalar.isValidIdentifierContinuationCodePoint has cyclomatic complexity 86 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
BasicFormat.visit (cyclomatic 50) Sources/SwiftBasicFormat/BasicFormat.swift:439— BasicFormat.visit has cyclomatic complexity 50 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Scalar.isOperatorStartCodePoint (cyclomatic 37) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:123— Scalar.isOperatorStartCodePoint has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cursor.lexNumber (cyclomatic 37) Sources/SwiftParser/Lexer/Cursor.swift:1689— Cursor.lexNumber has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseUnsuppressedSimpleType (cyclomatic 35) Sources/SwiftParser/Types.swift:316— Parser.parseUnsuppressedSimpleType has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseSequenceExpressionOperator (cyclomatic 32) Sources/SwiftParser/Expressions.swift:260— Parser.parseSequenceExpressionOperator has cyclomatic complexity 32 (threshold 15). Of this number, 23 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RawSyntaxNodesFile.swift.rawSyntaxNodesFile (cyclomatic 29) CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift:18— RawSyntaxNodesFile.swift.rawSyntaxNodesFile has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cursor.lexHexNumber (cyclomatic 29) Sources/SwiftParser/Lexer/Cursor.swift:1839— Cursor.lexHexNumber has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Attached.partiallyResolve (cyclomatic 28) Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift:163— Attached.partiallyResolve has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Parser.isStartOfReturnExpr (cyclomatic 27) Sources/SwiftParser/Statements.swift:638— Parser.isStartOfReturnExpr has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Cursor.lexTriviaByScanning (cyclomatic 27) Sources/SwiftParser/Lexer/Cursor.swift:1560— Cursor.lexTriviaByScanning has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseGenericWhereClause (cyclomatic 26) Sources/SwiftParser/Declarations.swift:714— Parser.parseGenericWhereClause has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parseDeclaration (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
TokenConsumer.atStartOfDeclaration (cyclomatic 26) Sources/SwiftParser/Declarations.swift:61— TokenConsumer.atStartOfDeclaration has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parseDeclaration (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ParseDiagnosticsGenerator.handleMissingSyntax (cyclomatic 26) Sources/SwiftParserDiagnostics/MissingNodesError.swift:370— ParseDiagnosticsGenerator.handleMissingSyntax has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
JSONScanner.scanNonASCIIScalar (cyclomatic 25) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:404— JSONScanner.scanNonASCIIScalar has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cursor.lexEscapedIdentifier (cyclomatic 25) Sources/SwiftParser/Lexer/Cursor.swift:2447— Cursor.lexEscapedIdentifier has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ParseDiagnosticsGenerator.visit (cyclomatic 25) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:376— ParseDiagnosticsGenerator.visit has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TokenConsumer.atContextualKeywordPrefixedSyntax (cyclomatic 24) Sources/SwiftParser/Statements.swift:917— TokenConsumer.atContextualKeywordPrefixedSyntax has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Cursor.lexCharacterInStringLiteral (cyclomatic 23) Sources/SwiftParser/Lexer/Cursor.swift:2021— Cursor.lexCharacterInStringLiteral has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Trivia.extractDocCommentLines (cyclomatic 23) Sources/SwiftSyntax/Trivia+commentValue.swift:78— Trivia.extractDocCommentLines has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MacroExpansion.swift.expandAttachedMacroWithoutCollapsing (cyclomatic 23) Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift:251— MacroExpansion.swift.expandAttachedMacroWithoutCollapsing has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_JSONStringParser.decodeEscapeSequence (cyclomatic 22) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:684— _JSONStringParser.decodeEscapeSequence has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Attached.findUnqualifiedType (cyclomatic 22) Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift:51— Attached.findUnqualifiedType has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lookahead.startsParameterName (cyclomatic 22) Sources/SwiftParser/Patterns.swift:359— Lookahead.startsParameterName has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Cursor.nextToken (cyclomatic 22) Sources/SwiftParser/Lexer/Cursor.swift:577— Cursor.nextToken has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TypeResolver.resolveNominalTypeDecl (cyclomatic 21) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:583— TypeResolver.resolveNominalTypeDecl has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TypeResolver.resolveMember (cyclomatic 21) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:814— TypeResolver.resolveMember has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Parser.parsePrecedenceGroupAttributeListSyntax (cyclomatic 21) Sources/SwiftParser/Declarations.swift:2060— Parser.parsePrecedenceGroupAttributeListSyntax has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: Parser.parseDeclaration (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Lookahead.canParseClosureSignature (cyclomatic 21) Sources/SwiftParser/Expressions.swift:2780— Lookahead.canParseClosureSignature has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parsePrimaryExpression (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
ValueDeclSyntax.isStatic (cyclomatic 20) Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:358— ValueDeclSyntax.isStatic has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseGenericParameters (cyclomatic 20) Sources/SwiftParser/Declarations.swift:583— Parser.parseGenericParameters has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parseDeclaration (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Parser.parseBindingDeclaration (cyclomatic 20) Sources/SwiftParser/Declarations.swift:1516— Parser.parseBindingDeclaration has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parseDeclaration (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Parser.parseSequenceExpressionElementPrefixIfPresent (cyclomatic 20) Sources/SwiftParser/Expressions.swift:467— Parser.parseSequenceExpressionElementPrefixIfPresent has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Parser.parsePrimaryExpression (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Parser.parseClosureSignatureIfPresent (cyclomatic 20) Sources/SwiftParser/Expressions.swift:1956— Parser.parseClosureSignatureIfPresent has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parsePrimaryExpression (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Parser.parseSimpleOrCompositionType (cyclomatic 20) Sources/SwiftParser/Types.swift:111— Parser.parseSimpleOrCompositionType has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConfiguredRegionVisitor.visit (cyclomatic 19) Sources/SwiftIfConfig/ConfiguredRegions.swift:210— ConfiguredRegionVisitor.visit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeResolver.resolveUnqualifiedReference (cyclomatic 19) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:295— TypeResolver.resolveUnqualifiedReference has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseEffectSpecifiers (cyclomatic 19) Sources/SwiftParser/Specifiers.swift:685— Parser.parseEffectSpecifiers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseMisplacedEffectSpecifiers (cyclomatic 19) Sources/SwiftParser/Specifiers.swift:845— Parser.parseMisplacedEffectSpecifiers has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseTypeAttributeList (cyclomatic 19) Sources/SwiftParser/Types.swift:1402— Parser.parseTypeAttributeList has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TriviaParser.parseTrivia (cyclomatic 19) Sources/SwiftParser/TriviaParser.swift:17— TriviaParser.parseTrivia has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Lookahead.canParseSimpleType (cyclomatic 19) Sources/SwiftParser/Types.swift:1007— Lookahead.canParseSimpleType has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Lookahead.canParseTupleBodyType (cyclomatic 19) Sources/SwiftParser/Types.swift:1119— Lookahead.canParseTupleBodyType has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DiagnosticsFormatter.annotatedSource (cyclomatic 18) Sources/SwiftDiagnostics/DiagnosticsFormatter.swift:207— DiagnosticsFormatter.annotatedSource has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseStringLiteral (cyclomatic 18) Sources/SwiftParser/StringLiterals.swift:499— Parser.parseStringLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseCodeBlockItem (cyclomatic 18) Sources/SwiftParser/TopLevel.swift:147— Parser.parseCodeBlockItem has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.parseTupleTypeBody (cyclomatic 18) Sources/SwiftParser/Types.swift:643— Parser.parseTupleTypeBody has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RegexLiteralLexer.lexPatternCharacter (cyclomatic 18) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:73— RegexLiteralLexer.lexPatternCharacter has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RegexLiteralLexer.lexImpl (cyclomatic 18) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:221— RegexLiteralLexer.lexImpl has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cursor.lexEscapedCharacter (cyclomatic 18) Sources/SwiftParser/Lexer/Cursor.swift:2106— Cursor.lexEscapedCharacter has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Cursor.lexNormal (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Cursor.lexInStringLiteral (cyclomatic 18) Sources/SwiftParser/Lexer/Cursor.swift:2314— Cursor.lexInStringLiteral has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Cursor.lexNormal (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
SyntaxProtocol.debugWrite (cyclomatic 18) Sources/SwiftSyntax/SyntaxProtocol.swift:646— SyntaxProtocol.debugWrite has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TokenDiagnostic.fixIts (cyclomatic 18) Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift:259— TokenDiagnostic.fixIts has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: TokenDiagnostic.diagnosticMessage (cyclomatic 40) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
DeclName.tryMatch (cyclomatic 17) Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:252— DeclName.tryMatch has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Parser.parseDocumentationAttributeArguments (cyclomatic 17) Sources/SwiftParser/Attributes.swift:1085— Parser.parseDocumentationAttributeArguments has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Parser.parseAttribute (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Parser.parseKeyPathExpression (cyclomatic 17) Sources/SwiftParser/Expressions.swift:1128— Parser.parseKeyPathExpression has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Parser.parsePrimaryExpression (cyclomatic 25) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
Lookahead.skip (cyclomatic 17) Sources/SwiftParser/Lookahead.swift:375— Lookahead.skip has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Cursor.classifyOperatorToken (cyclomatic 17) Sources/SwiftParser/Lexer/Cursor.swift:2551— Cursor.classifyOperatorToken has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: Cursor.lexNormal (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MacroApplication.visitAny (cyclomatic 17) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:679— MacroApplication.visitAny has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Builder.applyChangeSet (cyclomatic 16) CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift:240— Builder.applyChangeSet has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Diagnostic.init (cyclomatic 16) Sources/SwiftCompilerPluginMessageHandling/Diagnostics.swift:65— Diagnostic.init has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Scalar.lexing (cyclomatic 16) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:180— Scalar.lexing has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AttributeRemover.visit (cyclomatic 16) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:536— AttributeRemover.visit has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D10 · Test Quality· Test project verifies nothing · ×1
Test project verifies nothing: SwiftSyntaxMacrosTestSupportTests Tests/SwiftSyntaxMacrosTestSupportTests/AssertionsTests.swift:68— No conventional assertion call was detected in 3 of 3 tests in `SwiftSyntaxMacrosTestSupportTests` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
D12 · Dependency Hygiene· No Package.resolved committed (CodeGeneration/Package.swift) · ×1
No Package.resolved committed (CodeGeneration/Package.swift) — CodeGeneration/Package.swift declares 2 dependencies and no `.library` product, so it is an APPLICATION — but no `Package.resolved` is committed beside it. Nothing records the versions a working build resolved to, so `swift build` re-resolves against whatever each dependency's git host serves today and two builds of this commit are not guaranteed to be the same build. Build once and commit the resulting `Package.resolved`. (A published LIBRARY correctly omits its resolution — SwiftPM ignores a library's `Package.resolved` when the package is consumed — which is why this is asked only of a package that ships no `.library` product.)
D12 · Dependency Hygiene· No Package.resolved committed (SwiftParserCLI/Package.swift) · ×1
No Package.resolved committed (SwiftParserCLI/Package.swift) — SwiftParserCLI/Package.swift declares 1 dependency and no `.library` product, so it is an APPLICATION — but no `Package.resolved` is committed beside it. Nothing records the versions a working build resolved to, so `swift build` re-resolves against whatever each dependency's git host serves today and two builds of this commit are not guaranteed to be the same build. Build once and commit the resulting `Package.resolved`. (A published LIBRARY correctly omits its resolution — SwiftPM ignores a library's `Package.resolved` when the package is consumed — which is why this is asked only of a package that ships no `.library` product.)
D12 · Dependency Hygiene· No Package.resolved committed (SwiftSyntaxDevUtils/Package.swift) · ×1
No Package.resolved committed (SwiftSyntaxDevUtils/Package.swift) — SwiftSyntaxDevUtils/Package.swift declares 1 dependency and no `.library` product, so it is an APPLICATION — but no `Package.resolved` is committed beside it. Nothing records the versions a working build resolved to, so `swift build` re-resolves against whatever each dependency's git host serves today and two builds of this commit are not guaranteed to be the same build. Build once and commit the resulting `Package.resolved`. (A published LIBRARY correctly omits its resolution — SwiftPM ignores a library's `Package.resolved` when the package is consumed — which is why this is asked only of a package that ships no `.library` product.)
IfConfigEvaluation.swift.evaluateIfConfig (cognitive 134) Sources/SwiftIfConfig/IfConfigEvaluation.swift:31— IfConfigEvaluation.swift.evaluateIfConfig has cognitive complexity 134 (threshold 15). Drivers by points: if/else 42 (86 pts), boolean chains 33, match/switch 4 (8 pts), error handling 3 (7 pts) (nesting depth added 52). Of this number, 117 points are the body's own statements and 17 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scalar.isValidIdentifierContinuationCodePoint (cognitive 85) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:14— Scalar.isValidIdentifierContinuationCodePoint has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 84, if/else 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RawSyntaxNodesFile.swift.rawSyntaxNodesFile (cognitive 83) CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/RawSyntaxNodesFile.swift:18— RawSyntaxNodesFile.swift.rawSyntaxNodesFile has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 10 (34 pts), if/else 11 (25 pts), loops 9 (23 pts), boolean chains 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BasicFormat.visit (cognitive 57) Sources/SwiftBasicFormat/BasicFormat.swift:439— BasicFormat.visit has cognitive complexity 57 (threshold 15). Drivers by points: if/else 31 (36 pts), boolean chains 21 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.parseGenericWhereClause (cognitive 56) Sources/SwiftParser/Declarations.swift:714— Parser.parseGenericWhereClause has cognitive complexity 56 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 5 (21 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseMisplacedEffectSpecifiers (cognitive 51) Sources/SwiftParser/Specifiers.swift:845— Parser.parseMisplacedEffectSpecifiers has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (43 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexNumber (cognitive 51) Sources/SwiftParser/Lexer/Cursor.swift:1689— Cursor.lexNumber has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 17 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseUnsuppressedSimpleType (cognitive 43) Sources/SwiftParser/Types.swift:316— Parser.parseUnsuppressedSimpleType has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 5, match/switch 4, loops 1, ternaries 1 (nesting depth added 17). Of this number, 38 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexTriviaByScanning (cognitive 43) Sources/SwiftParser/Lexer/Cursor.swift:1560— Cursor.lexTriviaByScanning has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (33 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexHexNumber (cognitive 43) Sources/SwiftParser/Lexer/Cursor.swift:1839— Cursor.lexHexNumber has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 13 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Attached.findUnqualifiedType (cognitive 39) Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift:51— Attached.findUnqualifiedType has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 23). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser.parseClosureSignatureIfPresent (cognitive 39) Sources/SwiftParser/Expressions.swift:1956— Parser.parseClosureSignatureIfPresent has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (9 pts), boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scalar.isOperatorStartCodePoint (cognitive 38) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:123— Scalar.isOperatorStartCodePoint has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 34, if/else 2, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Parser.parseGenericParameters (cognitive 37) Sources/SwiftParser/Declarations.swift:583— Parser.parseGenericParameters has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConfiguredRegionVisitor.visit (cognitive 35) Sources/SwiftIfConfig/ConfiguredRegions.swift:210— ConfiguredRegionVisitor.visit has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 5, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MacroExpansion.swift.expandAttachedMacroWithoutCollapsing (cognitive 35) Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift:251— MacroExpansion.swift.expandAttachedMacroWithoutCollapsing has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 4, match/switch 1 (2 pts), error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DiagnosticsFormatter.annotatedSource (cognitive 33) Sources/SwiftDiagnostics/DiagnosticsFormatter.swift:207— DiagnosticsFormatter.annotatedSource has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseSimpleOrCompositionType (cognitive 33) Sources/SwiftParser/Types.swift:111— Parser.parseSimpleOrCompositionType has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (9 pts), boolean chains 6 (nesting depth added 12). Of this number, 28 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSONScanner.scanNonASCIIScalar (cognitive 32) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:404— JSONScanner.scanNonASCIIScalar has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 15, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser.parseTupleTypeBody (cognitive 32) Sources/SwiftParser/Types.swift:643— Parser.parseTupleTypeBody has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 9, loops 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenConsumer.atStartOfDeclaration (cognitive 32) Sources/SwiftParser/Declarations.swift:61— TokenConsumer.atStartOfDeclaration has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 6, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.canRecoverToImpl (cognitive 32) Sources/SwiftParser/Recovery.swift:156— Lookahead.canRecoverToImpl has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexEscapedIdentifier (cognitive 32) Sources/SwiftParser/Lexer/Cursor.swift:2447— Cursor.lexEscapedIdentifier has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 10, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseBindingDeclaration (cognitive 31) Sources/SwiftParser/Declarations.swift:1516— Parser.parseBindingDeclaration has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 12, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseKeyPathExpression (cognitive 31) Sources/SwiftParser/Expressions.swift:1128— Parser.parseKeyPathExpression has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 7, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.canParseTupleBodyType (cognitive 31) Sources/SwiftParser/Types.swift:1119— Lookahead.canParseTupleBodyType has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 9, loops 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDiagnosticsGenerator.handleMissingSyntax (cognitive 31) Sources/SwiftParserDiagnostics/MissingNodesError.swift:370— ParseDiagnosticsGenerator.handleMissingSyntax has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 11, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SyntaxProtocol.allMacroLexicalContexts (cognitive 31) Sources/SwiftSyntaxMacros/Syntax+LexicalContext.swift:111— SyntaxProtocol.allMacroLexicalContexts has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (8 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NodesDescriptionPart.descriptionParts (cognitive 30) Sources/SwiftParserDiagnostics/MissingNodesError.swift:71— NodesDescriptionPart.descriptionParts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, match/switch 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Node.containedIn (cognitive 29) CodeGeneration/Sources/SyntaxSupport/Node.swift:165— Node.containedIn has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyntaxNodesFile.swift.syntaxNode (cognitive 29) CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxNodesFile.swift:22— SyntaxNodesFile.swift.syntaxNode has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 4 (13 pts), loops 6 (11 pts), if/else 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JSONScanner.scanString (cognitive 29) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:283— JSONScanner.scanString has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseStringLiteral (cognitive 29) Sources/SwiftParser/StringLiterals.swift:499— Parser.parseStringLiteral has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegexLiteralLexer.lexImpl (cognitive 29) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:221— RegexLiteralLexer.lexImpl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 3 (8 pts), loops 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.canParseClosureSignature (cognitive 29) Sources/SwiftParser/Expressions.swift:2780— Lookahead.canParseClosureSignature has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 8). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.classifyOperatorToken (cognitive 29) Sources/SwiftParser/Lexer/Cursor.swift:2551— Cursor.classifyOperatorToken has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDiagnosticsGenerator.visit (cognitive 29) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:376— ParseDiagnosticsGenerator.visit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 14 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TypeResolver.resolveUnqualifiedReference (cognitive 28) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:295— TypeResolver.resolveUnqualifiedReference has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseTypeAttributeList (cognitive 28) Sources/SwiftParser/Types.swift:1402— Parser.parseTypeAttributeList has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 6, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.canParseTypeAttributeList (cognitive 28) Sources/SwiftParser/Types.swift:893— Lookahead.canParseTypeAttributeList has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexCharacterInStringLiteral (cognitive 28) Sources/SwiftParser/Lexer/Cursor.swift:2021— Cursor.lexCharacterInStringLiteral has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (7 pts), boolean chains 4 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Trivia.extractDocCommentLines (cognitive 28) Sources/SwiftSyntax/Trivia+commentValue.swift:78— Trivia.extractDocCommentLines has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 3, match/switch 1 (2 pts), loops 1, ternaries 1 (nesting depth added 7). Of this number, 18 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PrecedenceGraph.searchRelationships (cognitive 27) Sources/SwiftOperators/PrecedenceGraph.swift:71— PrecedenceGraph.searchRelationships has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 1 (5 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseEffectSpecifiers (cognitive 27) Sources/SwiftParser/Specifiers.swift:685— Parser.parseEffectSpecifiers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexInStringLiteral (cognitive 27) Sources/SwiftParser/Lexer/Cursor.swift:2314— Cursor.lexInStringLiteral has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parsePrecedenceGroupAttributeListSyntax (cognitive 26) Sources/SwiftParser/Declarations.swift:2060— Parser.parsePrecedenceGroupAttributeListSyntax has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (7 pts), match/switch 3 (5 pts), boolean chains 4 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RegexLiteralLexer.tryEatEnding (cognitive 26) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:151— RegexLiteralLexer.tryEatEnding has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SyntaxProtocol.debugWrite (cognitive 26) Sources/SwiftSyntax/SyntaxProtocol.swift:646— SyntaxProtocol.debugWrite has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeResolver.resolveNominalTypeDecl (cognitive 25) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:583— TypeResolver.resolveNominalTypeDecl has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 8 (17 pts), if/else 4 (7 pts), boolean chains 1 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Lookahead.startsParameterName (cognitive 25) Sources/SwiftParser/Patterns.swift:359— Lookahead.startsParameterName has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (10 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
DeclGroupLookup.swift._visitDirectMembersOfDecl::processMember (cognitive 24) Sources/SwiftLexicalLookup/QualifiedLookup/DeclGroupLookup.swift:136— DeclGroupLookup.swift._visitDirectMembersOfDecl::processMember has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (11 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TokenDiagnostic.fixIts (cognitive 24) Sources/SwiftParserDiagnostics/LexerDiagnosticMessages.swift:259— TokenDiagnostic.fixIts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FixItApplier.apply (cognitive 23) Sources/SwiftIDEUtils/FixItApplier.swift:56— FixItApplier.apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). Of this number, 14 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.canParseSimpleType (cognitive 23) Sources/SwiftParser/Types.swift:1007— Lookahead.canParseSimpleType has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttributeRemover.visit (cognitive 23) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:536— AttributeRemover.visit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 7, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.finish (cognitive 22) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:509— Builder.finish has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (inferClosingDelimiter). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
BasicFormat.requiresNewline (cognitive 22) Sources/SwiftBasicFormat/BasicFormat.swift:251— BasicFormat.requiresNewline has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_JSONStringParser.decodeEscapeSequence (cognitive 22) Sources/SwiftCompilerPluginMessageHandling/JSON/JSONDecoding.swift:684— _JSONStringParser.decodeEscapeSequence has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ValueDeclSyntax.isStatic (cognitive 22) Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:358— ValueDeclSyntax.isStatic has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3, match/switch 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parsePostfixExpressionSuffix (cognitive 22) Sources/SwiftParser/Expressions.swift:790— Parser.parsePostfixExpressionSuffix has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexOperatorIdentifier (cognitive 22) Sources/SwiftParser/Lexer/Cursor.swift:2624— Cursor.lexOperatorIdentifier has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacroApplication.expandAccessors (cognitive 22) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:1261— MacroApplication.expandAccessors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.applyChangeSet (cognitive 21) CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift:240— Builder.applyChangeSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 8, loops 2 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GroupedDiagnostics.annotateSource (cognitive 21) Sources/SwiftDiagnostics/GroupedDiagnostics.swift:186— GroupedDiagnostics.annotateSource has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SequentialScopeSyntax.sequentialLookup (cognitive 21) Sources/SwiftLexicalLookup/Scopes/SequentialScopeSyntax.swift:41— SequentialScopeSyntax.sequentialLookup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InitSignature.createConvenienceBuilderInitializer (cognitive 20) CodeGeneration/Sources/generate-swift-syntax/InitSignature+Extensions.swift:115— InitSignature.createConvenienceBuilderInitializer has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 2 (4 pts), loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IndentationInferrer.visit (cognitive 20) Sources/SwiftBasicFormat/InferIndentation.swift:50— IndentationInferrer.visit has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (10 pts), loops 3 (7 pts), if/else 3 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
OperatorTable.fold (cognitive 20) Sources/SwiftOperators/OperatorTable+Folding.swift:288— OperatorTable.fold has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseCollectionLiteral (cognitive 20) Sources/SwiftParser/Expressions.swift:1764— Parser.parseCollectionLiteral has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseCodeBlockItem (cognitive 20) Sources/SwiftParser/TopLevel.swift:147— Parser.parseCodeBlockItem has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 5, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.parseResultType (cognitive 20) Sources/SwiftParser/Types.swift:1529— Parser.parseResultType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Scalar.lexing (cognitive 20) Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:180— Scalar.lexing has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RawSyntax.firstChildResultInSourceOrder (cognitive 20) Sources/SwiftSyntax/Raw/RawSyntax.swift:539— RawSyntax.firstChildResultInSourceOrder has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
RawSyntax.lastChildResultInSourceOrder (cognitive 20) Sources/SwiftSyntax/Raw/RawSyntax.swift:564— RawSyntax.lastChildResultInSourceOrder has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DeclName.tryMatch (cognitive 19) Sources/SwiftLexicalLookup/QualifiedLookup/DeclName.swift:252— DeclName.tryMatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Parser.postProcessIndentationAndEscapedNewlineOfMiddleSegments (cognitive 19) Sources/SwiftParser/StringLiterals.swift:241— Parser.postProcessIndentationAndEscapedNewlineOfMiddleSegments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.lexStringQuote (cognitive 19) Sources/SwiftParser/Lexer/Cursor.swift:2221— Cursor.lexStringQuote has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParseDiagnosticsGenerator.handleEffectSpecifiers (cognitive 19) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:293— ParseDiagnosticsGenerator.handleEffectSpecifiers has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 5 (8 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Diagnostic.init (cognitive 18) Sources/SwiftCompilerPluginMessageHandling/Diagnostics.swift:65— Diagnostic.init has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActiveSyntaxRewriter.dropInactive (cognitive 18) Sources/SwiftIfConfig/ActiveSyntaxRewriter.swift:167— ActiveSyntaxRewriter.dropInactive has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 1 (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseAttribute (cognitive 18) Sources/SwiftParser/Attributes.swift:180— Parser.parseAttribute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 2 (5 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseUnexpectedCodeDeclaration (cognitive 18) Sources/SwiftParser/Declarations.swift:2342— Parser.parseUnexpectedCodeDeclaration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseFunctionParameter (cognitive 18) Sources/SwiftParser/Parameters.swift:89— Parser.parseFunctionParameter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.parseDeinitEffectSpecifiers (cognitive 18) Sources/SwiftParser/Specifiers.swift:795— Parser.parseDeinitEffectSpecifiers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TriviaParser.parseTrivia (cognitive 18) Sources/SwiftParser/TriviaParser.swift:17— TriviaParser.parseTrivia has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.skip (cognitive 18) Sources/SwiftParser/Lookahead.swift:375— Lookahead.skip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallLikeSyntax.convertToTrailingClosures (cognitive 18) Sources/SwiftRefactor/CallToTrailingClosures.swift:87— CallLikeSyntax.convertToTrailingClosures has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RawSyntax.makeLayout (cognitive 18) Sources/SwiftSyntax/Raw/RawSyntax.swift:1380— RawSyntax.makeLayout has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (5 pts), ternaries 3, boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MacroApplication.visit (cognitive 18) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:905— MacroApplication.visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 4 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VersionTuple.parseCompilerBuildVersion (cognitive 17) Sources/SwiftIfConfig/VersionTuple+Parsing.swift:47— VersionTuple.parseCompilerBuildVersion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeResolver.reduceComposition (cognitive 17) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:166— TypeResolver.reduceComposition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseMemberBlockItem (cognitive 17) Sources/SwiftParser/Declarations.swift:939— Parser.parseMemberBlockItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Parser.parsePoundIfDirective (cognitive 17) Sources/SwiftParser/Directives.swift:47— Parser.parsePoundIfDirective has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseSequenceExpressionOperator (cognitive 17) Sources/SwiftParser/Expressions.swift:260— Parser.parseSequenceExpressionOperator has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 5 (6 pts), boolean chains 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Parser.parseSimpleString (cognitive 17) Sources/SwiftParser/StringLiterals.swift:661— Parser.parseSimpleString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegexLiteralLexer.lexPatternCharacter (cognitive 17) Sources/SwiftParser/Lexer/RegexLiteralLexer.swift:73— RegexLiteralLexer.lexPatternCharacter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Lookahead.skipAttributesAndModifiers (cognitive 17) Sources/SwiftParser/Declarations.swift:141— Lookahead.skipAttributesAndModifiers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cursor.nextToken (cognitive 17) Sources/SwiftParser/Lexer/Cursor.swift:577— Cursor.nextToken has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
NodesDescriptionPart.description (cognitive 17) Sources/SwiftParserDiagnostics/MissingNodesError.swift:37— NodesDescriptionPart.description has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AddPackageDependency.dependencyAlreadyAdded (cognitive 17) Sources/SwiftRefactor/PackageManifest/AddPackageDependency.swift:69— AddPackageDependency.dependencyAlreadyAdded has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2 (nesting depth added 8). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
RawSyntaxNodeProtocol.makeUnexpectedKeepingNodes (cognitive 17) Sources/SwiftParser/SyntaxUtils.swift:212— RawSyntaxNodeProtocol.makeUnexpectedKeepingNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function items inside it that branch (walk, attachAccumulatedTokensToLastKeptNode). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
MacroApplication.visitAny (cognitive 17) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:679— MacroApplication.visitAny has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MacroExpansion.swift.collapse (cognitive 17) Sources/SwiftSyntaxMacroExpansion/MacroExpansion.swift:598— MacroExpansion.swift.collapse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeResolver.resolveMember (cognitive 16) Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift:814— TypeResolver.resolveMember has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseImportPath (cognitive 16) Sources/SwiftParser/Declarations.swift:425— Parser.parseImportPath has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseDeclReferenceBase (cognitive 16) Sources/SwiftParser/Names.swift:192— Parser.parseDeclReferenceBase has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parsePatternTupleElements (cognitive 16) Sources/SwiftParser/Patterns.swift:155— Parser.parsePatternTupleElements has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 3 (7 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser.parseConditionElement (cognitive 16) Sources/SwiftParser/Statements.swift:194— Parser.parseConditionElement has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Cursor.lexCarriageReturn (cognitive 16) Sources/SwiftParser/TriviaParser.swift:139— Cursor.lexCarriageReturn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CallLikeSyntax.expandClosurePlaceholders (cognitive 16) Sources/SwiftRefactor/ExpandEditorPlaceholder.swift:406— CallLikeSyntax.expandClosurePlaceholders has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change-coupling hub: SyntaxUtils.swift → Declarations.swift, ParseDiagnosticsGenerator.swift, ParserDiagnosticMessages.swift Sources/SwiftParser/SyntaxUtils.swift— `Sources/SwiftParser/SyntaxUtils.swift` changes together with 3 other files — `Sources/SwiftParser/Declarations.swift`, `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift`, `Sources/SwiftParserDiagnostics/ParserDiagnosticMessages.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:6— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step2.swift:4-23 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step3.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step4.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step5.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:6-25 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:27— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:27-59 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:27-62 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:27-39 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:27-49 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:27-57 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) Sources/SwiftParser/Nominals.swift:70— Sources/SwiftParser/Nominals.swift:70-96 | Sources/SwiftParser/Nominals.swift:104-130 | Sources/SwiftParser/Nominals.swift:138-164 | Sources/SwiftParser/Nominals.swift:172-198 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (38 lines × 2) Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:246— Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:246-283 | Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:286-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (32 lines × 2) CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift:32— CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift:32-63 | CodeGeneration/Sources/SyntaxSupport/ExperimentalFeatures.swift:66-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (28–29 lines × 2) Sources/SwiftParser/Lexer/Cursor.swift:1805— Sources/SwiftParser/Lexer/Cursor.swift:1805-1833 | Sources/SwiftParser/Lexer/Cursor.swift:1933-1960 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Lexer/Cursor.swift:1805` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17–25 lines × 2) Sources/SwiftIfConfig/IfConfigEvaluation.swift:276— Sources/SwiftIfConfig/IfConfigEvaluation.swift:276-292 | Sources/SwiftIfConfig/IfConfigEvaluation.swift:496-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftIfConfig/IfConfigEvaluation.swift:496` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20–21 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:507— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:507-526 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:626-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:507` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:123— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:123-143 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:245-265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:123` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16–21 lines × 2) Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:123— Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:123-143 | Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:184-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 10) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:6— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step2.swift:4-23 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step3.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step4.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step5.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step6.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:6-25 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:6-25 — before extracting anything, compare `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step4.swift:28` calls `parse` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step2.swift:27` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 4) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:28— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:28-47 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:28-47 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:28-47 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:28-47 — before extracting anything, compare `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 3) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:96— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:96-115 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:749-768 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:1133-1152 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18–20 lines × 2) Sources/SwiftParser/Expressions.swift:2425— Sources/SwiftParser/Expressions.swift:2425-2444 | Sources/SwiftParser/Statements.swift:500-517 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16–19 lines × 2) Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift:331— Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift:331-349 | Sources/SwiftSyntaxMacroExpansion/BasicMacroExpansionContext.swift:156-171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftCompilerPluginMessageHandling/PluginMacroExpansionContext.swift:331` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (17 lines × 4) Sources/SwiftParser/Nominals.swift:70— Sources/SwiftParser/Nominals.swift:70-86 | Sources/SwiftParser/Nominals.swift:104-120 | Sources/SwiftParser/Nominals.swift:138-154 | Sources/SwiftParser/Nominals.swift:172-188 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Nominals.swift:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:84— Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:84-99 | Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:107-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14–15 lines × 2) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:587— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:587-600 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:710-724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:587` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 4) Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:40— Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:40-53 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:121-134 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:162-175 | Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:243-256 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:40` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 4) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:554— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:554-566 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:593-605 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:676-688 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:717-729 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:554` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12–13 lines × 3) Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:48— Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:48-59 | Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:246-258 | Sources/SwiftLexicalLookup/QualifiedLookup/ValueDeclSyntax.swift:286-298 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftLexicalLookup/QualifiedLookup/TypeDeclSyntax.swift:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) Sources/SwiftParser/Statements.swift:345— Sources/SwiftParser/Statements.swift:345-356 | Sources/SwiftParser/Statements.swift:806-818 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11–12 lines × 2) Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:308— Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:308-318 | Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:343-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntaxMacroExpansion/MacroSystem.swift:308` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 6) Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:517— Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:517-527 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:557-567 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:596-606 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:637-647 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:679-689 | Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:720-730 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/SwiftSyntaxCompatibility.swift:517` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 5) Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:27— Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:27-37 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift:27-37 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step7.swift:27-37 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step8.swift:27-37 | Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step9.swift:27-37 — before extracting anything, compare `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift` and `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step11.swift` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/Documentation.docc/Resources/Formatter.step10.swift:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–10 lines × 3) Sources/SwiftParser/Attributes.swift:435— Sources/SwiftParser/Attributes.swift:435-439 | Sources/SwiftParser/Attributes.swift:584-593 | Sources/SwiftParser/Attributes.swift:611-620 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParser/Attributes.swift:584` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) Sources/SwiftParser/Expressions.swift:883— Sources/SwiftParser/Expressions.swift:883-890 | Sources/SwiftParser/Expressions.swift:927-934 | Sources/SwiftParser/Expressions.swift:1537-1544 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 2) Sources/SwiftSyntax/EditorPlaceholder.swift:89— Sources/SwiftSyntax/EditorPlaceholder.swift:89-96 | Sources/SwiftSyntax/EditorPlaceholder.swift:99-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftSyntax/EditorPlaceholder.swift:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SwiftSyntax/EditorPlaceholder.swift:98` calls `firstRange` and `Sources/SwiftSyntax/EditorPlaceholder.swift:108` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:345— Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:345-350 | Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:918-924 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift:345` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) Sources/SwiftCompilerPluginMessageHandling/PluginMessages.swift:117— Sources/SwiftCompilerPluginMessageHandling/PluginMessages.swift:117-121 | Sources/SwiftSyntax/MemoryLayout.swift:20-24 | Sources/SwiftSyntaxMacros/AbstractSourceLocation.swift:27-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Near-duplicate member pair (52 shared lines) Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:23— Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift:23-183 | Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift:18-164 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
No direct assertions: testNotIndented Tests/SwiftBasicFormatTest/BasicFormatTests.swift:56— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testPartialIndent Tests/SwiftBasicFormatTest/BasicFormatTests.swift:73— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testPartialIndentNested Tests/SwiftBasicFormatTest/BasicFormatTests.swift:90— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testAlreadyIndented Tests/SwiftBasicFormatTest/BasicFormatTests.swift:111— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testAlreadyIndentedWithComment Tests/SwiftBasicFormatTest/BasicFormatTests.swift:122— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testAlreadyIndentedWithComment2 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:134— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testClosureIndentationArgBefore Tests/SwiftBasicFormatTest/BasicFormatTests.swift:153— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testClosureIndentationAfter Tests/SwiftBasicFormatTest/BasicFormatTests.swift:168— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testLineWrappingInsideIndentedBlock Tests/SwiftBasicFormatTest/BasicFormatTests.swift:183— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testSelfCall1 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:202— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testSelfCall2 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:209— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testSelfSubscript1 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:216— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testSelfSubscript2 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:223— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCustomIndentationInBlockThatDoesntHaveNewline Tests/SwiftBasicFormatTest/BasicFormatTests.swift:230— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testStringInterpolationAtStartOfMultiLineStringLiteral Tests/SwiftBasicFormatTest/BasicFormatTests.swift:247— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testMultilineStringLiteral Tests/SwiftBasicFormatTest/BasicFormatTests.swift:272— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testMultilineStringLiteralWithBlankLines Tests/SwiftBasicFormatTest/BasicFormatTests.swift:289— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testMultilineStringLiteralWithFirstLineBlank Tests/SwiftBasicFormatTest/BasicFormatTests.swift:303— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testNestedMultilineStringLiterals Tests/SwiftBasicFormatTest/BasicFormatTests.swift:313— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testIndentNestedMultilineStringLiterals Tests/SwiftBasicFormatTest/BasicFormatTests.swift:326— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testIndentNestedIndentedMultilineStringLiterals Tests/SwiftBasicFormatTest/BasicFormatTests.swift:357— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testClosureInStringInterpolation Tests/SwiftBasicFormatTest/BasicFormatTests.swift:388— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testNestedUserDefinedIndentation Tests/SwiftBasicFormatTest/BasicFormatTests.swift:402— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testDontInsertTrailingWhitespaceIfNextTokenStartsWithLeadingWhitespace Tests/SwiftBasicFormatTest/BasicFormatTests.swift:427— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testAccessor1 Tests/SwiftBasicFormatTest/BasicFormatTests.swift:454— No conventional assertion call was detected, and 65 of 65 tests in `SwiftBasicFormatTest` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
Orphaned file CodeGeneration/Sources/SyntaxSupport/Child.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/generate-swift-syntax/InitSignature+Extensions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftLexicalLookup/LookupName.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftParser/Lexer/UnicodeScalarExtensions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/generate-swift-syntax/GenerateSwiftSyntax.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/TriviaPiecesFile.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/_SwiftSyntaxTestSupport/SyntaxProtocol+Initializer.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/_SwiftSyntaxTestSupport/IncrementalParseTestUtils.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftDiagnostics/DiagnosticDecorators/ANSIDiagnosticDecorator.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftParserDiagnostics/DiagnosticExtensions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftLexicalLookup/SimpleLookupQueries.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/SyntaxSupport/Traits.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftSyntax/TokenSyntax.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftParserDiagnostics/SyntaxExtensions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftParserDiagnostics/MissingTokenError.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file CodeGeneration/Sources/Utils/CodeGenerationFormat.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/SwiftIDEUtils/DeclNameLocation.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file SwiftParserCLI/Sources/swift-parser-cli/Commands/Reduce.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file Sources/_SwiftSyntaxTestSupport/Syntax+Assertions.swift:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate CodeGeneration/Sources/SyntaxSupport/Utils.swift:64— `!isEmpty && index(after: startIndex) == endIndex` appears character-identically in 2 files — CodeGeneration/Sources/SyntaxSupport/Utils.swift, Sources/SwiftParserDiagnostics/Utils.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/SwiftParser/StringLiterals.swift:54— `$0 == UInt8(ascii: "\n") || $0 == UInt8(ascii: "\r")` appears character-identically in 2 files — Sources/SwiftParser/StringLiterals.swift, Sources/SwiftSyntax/SourceLocation.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/SwiftParser/Declarations.swift:1013— `$0.at(.rightBrace) || $0.atEndOfIfConfigClauseBody()` appears character-identically in 2 files — Sources/SwiftParser/Declarations.swift, Sources/SwiftParser/TopLevel.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift:157— `$0.isExperimental && !$0.isUnexpectedNodes` appears character-identically in 2 files — CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift, CodeGeneration/Sources/SyntaxSupport/InitSignature.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/SwiftParser/Declarations.swift:2258— `pound.trailingTriviaByteLength > 0 || currentToken.leadingTriviaByteLength > 0` appears character-identically in 2 files — Sources/SwiftParser/Declarations.swift, Sources/SwiftParser/Expressions.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/SwiftParser/Expressions.swift:2205— `self.atArgumentLabel(allowDollarIdentifier: true) && self.peek(isAt: .colon)` appears character-identically in 2 files — Sources/SwiftParser/Expressions.swift, Sources/SwiftParser/Types.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate Sources/SwiftParser/Lookahead.swift:142— `tokenKind.defaultText == nil || prefix == tokenKind.defaultText!` appears character-identically in 2 files — Sources/SwiftParser/Lookahead.swift, Sources/SwiftParser/Parser.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D10 · Test Quality· Test project verifies nothing · ×3
Test project verifies nothing: MacroExamples Examples/Tests/MacroExamples/Implementation/Accessor/EnvironmentValueMacroTests.swift:21— No conventional assertion call was detected in 57 of 57 tests in `MacroExamples` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Test project verifies nothing: SwiftBasicFormatTest Tests/SwiftBasicFormatTest/BasicFormatTests.swift:56— No conventional assertion call was detected in 65 of 65 tests in `SwiftBasicFormatTest` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Test project verifies nothing: ValidateSyntaxNodes CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift:121— No conventional assertion call was detected in 16 of 16 tests in `ValidateSyntaxNodes` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 14 significant file(s) lose their only recent owner: Sources/SwiftLexicalLookup/TypeLookup/TypeResolver.swift, Sources/SwiftLexicalLookup/TypeLookup/PartialTypeResolution.swift, Sources/SwiftLexicalLookup/TypeLookup/TypeResolver+Failure.swift, Sources/SwiftLexicalLookup/TypeLookup/UnqualifiedTypeLookup.swift, Sources/SwiftLexicalLookup/TypeLookup/TypeGraph+TypeRef.swift, CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/TokenKindFile.swift, Sources/SwiftLexicalLookup/TypeLookup/SymbolTable+TypeGraph.swift, Sources/SwiftLexicalLookup/QualifiedLookup/NominalTypeDeclSyntax.swift (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 14 significant file(s) lose their only recent owner: Sources/SwiftParser/Lexer/RegexLiteralLexer.swift, Sources/SwiftCompilerPluginMessageHandling/JSON/JSONEncoding.swift, Sources/SwiftSyntax/Raw/RawSyntaxArena.swift, Sources/SwiftSyntax/Raw/RawSyntaxLayoutView.swift, Sources/SwiftParser/ParseSourceFile.swift, Sources/SwiftSyntax/Raw/RawSyntaxNodeProtocol.swift, Sources/SwiftSyntax/BumpPtrAllocator.swift, Sources/SwiftParser/TriviaParser.swift (+6 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: Sources/SwiftWarningControl/WarningControlRegions.swift, Sources/SwiftWarningControl/SyntaxProtocol+WarningControl.swift, Sources/SwiftWarningControl/DiagnosticGroupInheritanceTree.swift. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (38 single-owned of 249 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 249 of the 387 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Sources/SwiftLexicalLookup/QualifiedLookup/MemberKind.swift, Sources/SwiftLexicalLookup/QualifiedLookup/DeclScope.swift, Sources/SwiftIfConfig/ActiveSyntaxRewriter.swift, CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift, Sources/SwiftLexicalLookup/LookupName.swift, Sources/SwiftRefactor/PackageManifest/AddSwiftSetting.swift, SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/common/BuildArguments.swift.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 5 project(s) overshoot their size bounds, lowering Project Cohesion to 6.0/10. The most over is `(repository root)` (66379 LoC, 1297 module-visible types across 37 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 75 of 249 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 249 of the 387 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: CodeGeneration/Sources/SyntaxSupport/Child.swift, CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxBaseNodesFile.swift, Sources/SwiftSyntaxBuilder/SyntaxNodeWithBody.swift, Sources/SwiftSyntaxBuilder/ConvenienceInitializers.swift, CodeGeneration/Sources/SyntaxSupport/CompatibilityLayer.swift, CodeGeneration/Sources/generate-swift-syntax/InitSignature+Extensions.swift, Sources/SwiftLexicalLookup/LookupName.swift, Sources/SwiftSyntaxBuilder/SwiftSyntaxBuilderCompatibility.swift (and 67 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 1/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `CodeGeneration`, `EditorExtension`, `SwiftParserCLI`, `SwiftSyntaxDevUtils`.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 10084 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
Skipped (documented): failureReportedCorrectly Tests/SwiftSyntaxMacroExpansionTest/SwiftTestingTests.swift:38— Skipped with a documented reason — a deferral, not lazy debt: wrapped in withKnownIssue — the body is expected to fail, so its failure is not reported
Dependency hygiene PARTLY measured — SwiftPM pinning read, dependency currency NOT established — This repository's SwiftPM dependencies were read for PINNING discipline: 8 declaration(s) across 5 `Package.swift` manifest(s), against 0 committed pin(s). 3 pinning defect(s) are reported as separate rows below. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer release is the dependency-CURRENCY question, and no dependency here resolves to a VERSION to ask about — each is pinned to a branch or a revision, which tracks whatever that ref points at and therefore cannot be behind a release. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED. Note also what is deliberately NOT charged here: a published LIBRARY correctly commits no `Package.resolved` (SwiftPM ignores a library's resolution when the package is consumed), and a `path:` dependency is a local directory and the tightest possible binding, not a floating one. Known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Swift Package.swift/Package.resolved — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 77 file(s) — `CodeGeneration/Sources/SyntaxSupport/Child.swift`, `CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift`, `CodeGeneration/Sources/SyntaxSupport/SyntaxNodeKind.swift`, `CodeGeneration/Sources/generate-swift-syntax/InitSignature+Extensions.swift`, `CodeGeneration/Sources/generate-swift-syntax/templates/swiftparser/LanguageFeaturesFile.swift`, … (+72 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Swift Package.swift/Package.resolved — not scanned yet).
0
—
Run 01a18494-bd4d-7f1d-9e68-f2654254f8fa · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 17 · Warnings: 476 · Recommendations: 770 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 28-10-2026 @ 22:15 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.