Public report of swiftlang/swift-docc, published 15 November 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 report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). 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, 15 November 2026, 02:40 UTC · Survey ID cd_faf53f2d41f44ea48f3fbbb0ea78ed42

swiftlang/swift-docc

Measured 15 November 2026, 02:34 UTC, at code version 4cd8570

CAI score 63out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Up 3 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: 79,098 lines of product code in 12 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Production Readiness, 56

Findings by how serious they are

35 critical 1153 serious 175 minor

21 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 02:34 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 the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The score is deterministic, which means the same code always gets the same score. We work 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 ▸

50of 50 dimensions measured by tools.
1346of 1363 findings point to an exact file and line, so you can open each one in the code. The other 17 concern the repository as a whole, such as missing documentation.
50dimensions across 8 lenses, read from 79,098 lines of product code in 12 projects.
Chapters

Executive summary

swiftlang/swift-docc falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 63 out of 100 and is rated Adequate, and 12 of its 35 critical findings are security problems.

Production Readiness, at 56, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5 points. Adding tests for untested code would lift Production Readiness itself, worth about 4 points. Raising Production Readiness to 70 would lift the score to about 67.

Ten 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 four parts of the code are no longer understood by anyone working on it. Pinning each tool to an exact version, setting a waiting period for automatic updates and having someone learn the forgotten files would close these risks. Updating the vulnerable packages would fix the package with a known security hole. Giving each kind of identifier a type of its own would take care of the 17 identifiers passed around as plain numbers or text.

The product code is 79,098 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 for The 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.
Production Readiness 56 · counts for 45%Maturity 57 · counts for 25%Security and Compliance 70 · counts for 14%Code Health 78 · counts for 8%Domain Modelling 90 · counts for 4%Architecture 91 · counts for 2%Accessibility 100 · counts for 1%Performance 100 · counts for 1%

If Production Readiness rose from 56 to 70, the lowest score rated Strong, the score would rise from 63 to about 67.

Code composition: what the lines of code are
Product code 49%Tests 51%
New since the last survey: 116 findings

These 116 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · GeneratedCurationWriter.generateDefaultCurationContents (cyclomatic 16) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift
  • Cognitive Complexity · GeneratedCurationWriter.generateDefaultCurationContents (cognitive 27) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift
  • Cognitive Complexity · GeneratedCurationWriter.defaultCurationText (cognitive 21) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift
  • Cognitive Complexity · DeclarationFormatter._prettyPrintSwiftLikeFragments (cognitive 20) Sources/DocCHTML/MarkdownRenderer+Declaration.swift
  • Cognitive Complexity · GeneratedCurationWriter.taskGroupsToWrite (cognitive 16) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift
  • Code Duplication · Edited copy of a member (66 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.swift
  • Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift
  • Code Duplication · Edited copy of a member (59 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Sources/SwiftDocC/Semantics/ContentAndMedia.swift
  • Code Duplication · Edited copy of a member (32 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderReference.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift
  • Code Duplication · Edited copy of a member (51 corresponding lines) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Edited copy of a member (42 corresponding lines) Sources/SwiftDocC/Model/DocumentationNode.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift
  • Code Duplication · Edited copy of a member (46 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift
  • Code Duplication · Edited copy of a member (40 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Edited copy of a member (33 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Edited copy of a member (39 corresponding lines) Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/TaskGroup.swift
  • Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift
  • Code Duplication · Edited copy of a member (20 corresponding lines) Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift
  • Code Duplication · Edited copy of a member (32 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Edited copy of a member (22 corresponding lines) Sources/DocCHTML/MarkdownRenderer+Relationships.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/SwiftDocC/Utility/Synchronization.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/TaskGroupRenderSection.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/DocCHTML/MarkdownRenderer+Relationships.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift
  • Code Duplication · Edited copy of a member (19 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DictionaryKeysSectionTranslator.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/DocCTestUtilities/TestFileSystem.swift
  • Code Duplication · Edited copy of a member (24 corresponding lines) Sources/SwiftDocC/Infrastructure/CoverageDataEntry.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/DocumentationNode.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) Sources/SwiftDocC/Model/Section/Sections/DictionaryKeysSection.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Serialization.swift
  • Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/DocumentationMarkup.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialSectionsRenderSection.swift
  • Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift
  • Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift
  • Code Duplication · Edited copy of a member (18 corresponding lines) Sources/SwiftDocC/Semantics/Symbol/DocumentationDataVariants+SymbolGraphSymbol.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/ChildDirectiveWrapper.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Infrastructure/External Data/ExternalMetadata.swift
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) Sources/DocCHTML/HTMLNode+Tags.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Converter/DocumentationContextConverter.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/SwiftDocC/Model/Identifier.swift
  • Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/ContentRenderSection.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/DeclarationsRenderSection.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/DocCCommon/SourceLanguage.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift
  • Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift
  • Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) Sources/DocCCommandLine/ArgumentParsing/ArgumentValidation/URLArgumentValidator.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/DocCHTML/HTMLFormatter.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/SwiftDocC/Model/Section/Section.swift
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) Sources/DocCHTML/HTMLNode+Tags.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift
  • Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift
  • Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Technology/TutorialTableOfContents.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Infrastructure/Workspace/DefaultAvailability.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Semantics/HTTPParameter.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderTutorialsHierarchy.swift
  • Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/DocCCommon/SourceLanguage.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/SwiftDocC/Indexing/Indexable.swift
  • Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) Sources/SwiftDocC/Infrastructure/DocumentationContext+Inputs+Identifier.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Infrastructure/Communication/Code colors/CodeColorsPreferenceKey.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/DiffAvailability.swift
  • Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) Sources/SwiftDocC/Semantics/ContentAndMedia.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift
  • Code Duplication · Duplicated block (14–15 lines × 2) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift
  • Code Duplication · Duplicated block (15 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPBodySectionTranslator.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift

We compare 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: 47 findings

These 47 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one.

  • Cognitive Complexity · DeclarationFormatter.prettyPrintedSwiftDeclaration (cognitive 19) Sources/DocCHTML/MarkdownRenderer+Declaration.swift
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) Sources/SwiftDocC/DocumentationService/Models/Services/Convert/ConvertRequest.swift
  • Code Duplication · Duplicated block (18–24 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (18 lines × 2) Sources/SwiftDocC/Model/TaskGroup.swift
  • Code Duplication · Duplicated block (15 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (15 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (14–15 lines × 2) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift
  • Code Duplication · Duplicated block (15 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPBodySectionTranslator.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift
  • Code Duplication · Duplicated block (12 lines × 5) Sources/SwiftDocC/DocumentationService/Models/Services/Convert/ConvertRequest.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Duplicated block (10–11 lines × 3) Sources/SwiftDocC/Semantics/Metadata/CallToAction.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (8–9 lines × 2) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/AttributesSectionTranslator.swift
  • Code Duplication · Duplicated block (7 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift
  • Code Duplication · Duplicated block (6 lines × 3) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift
  • Code Duplication · Duplicated block (5 lines × 3) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/generate-symbol-graph/main.swift
  • Code Duplication · Duplicated block (12 lines × 3) Sources/SwiftDocC/Semantics/Options/AutomaticArticleSubheading.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/SwiftDocC/Infrastructure/Link Resolution/ExternalPathHierarchyResolver.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/SwiftDocC/Model/Rendering/Symbol/DiffAvailability.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/SwiftDocC/Semantics/Snippets/Snippet.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/SwiftDocC/Model/Rendering/References/FileReference.swift
  • Code Duplication · Duplicated block (5 lines × 2) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift
  • Code Duplication · Duplicated block (21–22 lines × 2) build-script-helper.py
  • Code Coverage · Low coverage: Sources/SwiftDocC/Checker/Checkers/MiscasedSectionHeading.swift Sources/SwiftDocC/Checker/Checkers/MiscasedSectionHeading.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SwiftDocC/Model/DocumentationNode.swift Sources/SwiftDocC/Model/DocumentationNode.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/SwiftDocC/Semantics/SemanticAnalyzer.swift Sources/SwiftDocC/Semantics/SemanticAnalyzer.swift
  • Explicit Debt · FixmeComment Sources/SwiftDocC/Model/Availability.swift
  • Explicit Debt · TodoComment Sources/DocCHTML/MarkdownRenderer.swift
  • Documentation (README) · README may be stale
  • A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €180,000 · Estimate
Cost to rebuild€61,000 to €300,000, for 1,012 to 3,209 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, 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.9 at a score of 63. 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.
SizeMedium: 79,098 lines of product code
What it is notNot 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: We price 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 1 No ADRs found finding(s) in ADR Quality — start with Package.swift.
Raises the score by about 5 points · Low effort · ADR Quality
2
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.
Raises the score by about 5 points · Medium effort · Architecture documentation
3
Resolve the 2 `baseUrl` spells `Url` where 103 names in the project spell it `URL` finding(s) in Naming Consistency — start with DiagnosticConsoleWriter.swift (2).
Raises the score by about 2 points · Low effort · Naming Consistency

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Files that change often carry extra risk · Combined risk
12 files are changed often and are hard to read, which makes them the likeliest places for a mistake. They also have under half their code tested, or were written almost entirely by one person, so a mistake there is less likely to be caught, or only one person knows the code well enough to avoid it. A change to these files therefore carries more risk than the overall score suggests.
Based on: Churn × Complexity Hotspots (14 files) · Code Coverage (461 files under half tested) · Bus Factor (0 files written almost entirely by one person) · The files: DocumentationContext.swift, RenderNodeTranslator.swift and HTMLRenderer.swift
What to do: Add tests to these files and have a second person review every change to them, starting with DocumentationContext.swift, RenderNodeTranslator.swift and HTMLRenderer.swift.
Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.3 person-years of work. Its weakest lens is Production Readiness, at 56 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
One cause behind 19 Domain Modelling findings · Common cause
19 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Rich vs anemic domain model (2 findings) · Strongly-typed ids (17 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 ADR Quality 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 6.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 7% on every change. The history of the code shows how much it changes: about 20,962 lines over the last 90 days, which is about 85,013 lines a year. At that pace, the extra work comes to an estimated 6.6 to 39.6 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 our 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.

arch DocCCommandLine (CMake) DocCCommandLine (CMake) SwiftDocC (CMake) SwiftDocC (CMake) DocCCommandLine (CMake)->SwiftDocC (CMake) DocCCommandLine (SwiftPM) DocCCommandLine (SwiftPM) DocCCommon (SwiftPM) DocCCommon (SwiftPM) DocCCommandLine (SwiftPM)->DocCCommon (SwiftPM) SwiftDocC (SwiftPM) SwiftDocC (SwiftPM) DocCCommandLine (SwiftPM)->SwiftDocC (SwiftPM) DocCCommon (CMake) DocCCommon (CMake) DocCHTML (CMake) DocCHTML (CMake) DocCHTML (CMake)->DocCCommon (CMake) DocCHTML (SwiftPM) DocCHTML (SwiftPM) DocCHTML (SwiftPM)->DocCCommon (SwiftPM) DocCTestUtilities DocCTestUtilities DocCTestUtilities->DocCCommon (SwiftPM) DocCTestUtilities->SwiftDocC (SwiftPM) SwiftDocC (CMake)->DocCCommon (CMake) SwiftDocC (CMake)->DocCHTML (CMake) SwiftDocC (SwiftPM)->DocCCommon (SwiftPM) SwiftDocC (SwiftPM)->DocCHTML (SwiftPM) docc (CMake) docc (CMake) docc (CMake)->DocCCommandLine (CMake) docc (SwiftPM) docc (SwiftPM) docc (SwiftPM)->DocCCommandLine (SwiftPM) generate-symbol-graph generate-symbol-graph generate-symbol-graph->SwiftDocC (SwiftPM)

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.

8 modules, with 18 dependencies between them. One loop runs through 6 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 →1 (global)2 docc3 DocCTestUtilities4 generate-symbol-graph5 SwiftDocC6 DocCHTML7 DocCCommon8 DocCCommandLine
1 (global)
2 docc
3 DocCTestUtilities271924
4 generate-symbol-graph247
5 SwiftDocC134234342
6 DocCHTML2718
7 DocCCommon209
8 DocCCommandLine963746
Uses a module listed above itPart of a loopThe module itself
1 (global)2 docc3 DocCTestUtilities4 generate-symbol-graph5 SwiftDocC6 DocCHTML7 DocCCommon8 DocCCommandLine(global)1docc2DocCTestUtilities3generate-symbol-graph4SwiftDocC5DocCHTML6DocCCommon7DocCCommandLine82719242471342343422718209963746

At a glance — Code Health · 78% · Strong ·

At a glance — Architecture · 91% · Exemplary ·

At a glance — Maturity · 57% · Adequate · gated by M2 ·

At a glance — Readiness · 56% · Adequate · gated by P3 ·

At a glance — Security · 70% · Adequate · gated by D36 ·

At a glance — Domain Modelling · 90% · Strong ·

At a glance — Accessibility · 100% · Exemplary ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection11High / Critical
A03:2025 — Software Supply Chain Failures5High / Critical
A02:2025 — Security Misconfiguration1Medium

Roadmap

Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Package.swift; 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; Resolve the 461 Low coverage finding(s) in Code Coverage — start with FixedSizeBitSet.swift, FastSymbolGraphJSONDecoder.swift, SymbolGraph+FastJSONDecodable.swift.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Package.swift.+5.4 ptsLowADR Quality
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.+4.9 ptsMediumArchitecture documentation
Resolve the 2 `baseUrl` spells `Url` where 103 names in the project spell it `URL` finding(s) in Naming Consistency — start with DiagnosticConsoleWriter.swift (2).+2.4 ptsLowNaming Consistency
Resolve the 461 Low coverage finding(s) in Code Coverage — start with FixedSizeBitSet.swift, FastSymbolGraphJSONDecoder.swift, SymbolGraph+FastJSONDecodable.swift.+4.2 ptsHighCode Coverage
Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with ExtendedTypeFormatTransformation.swift, NavigatorTree.swift, RenderMetadata.swift.+1.7 ptsLowKnowledge Freshness
Resolve the 3 Floating branch dependency finding(s) in Dependency Hygiene.+1.6 ptsLowDependency Hygiene
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.+3.1 ptsMediumSecurity & performance tooling
Resolve the 1 `encodeUrlVerbatim` spells `Url` where 103 names in the project spell it… finding(s) in Naming Consistency — start with DownloadReference.swift.+1.2 ptsLowNaming Consistency

File quality

Per-file score 0–10 — a quality signature. Of 533 files carrying findings, judged against the Production bar: 0% slop · 33% mixed · 67% near-clean.

FileScoreBandWorst signal
Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift4.0MixedCyclomatic Complexity: FastSymbolGraphJSONDecoder.decode (cyclomatic 16)
Sources/SwiftDocC/Semantics/Symbol/Symbol.swift4.1MixedCyclomatic Complexity: Symbol.init (cyclomatic 20)
Sources/SwiftDocC/Model/DocumentationMarkup.swift4.4MixedCyclomatic Complexity: DocumentationMarkup.init (cyclomatic 49)
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift4.8MixedCode Duplication: Edited copy of a member (46 corresponding lines)
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift5.5MixedCyclomatic Complexity: FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cyclomatic 66)
Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift5.5MixedCyclomatic Complexity: Symbol.init (cyclomatic 41)
Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift5.5MixedCognitive Complexity: SymbolGraphLoader.loadAll (cognitive 20)
Sources/SwiftDocC/Indexing/Indexable.swift5.5MixedCode Duplication: Edited copy of a member (3 corresponding lines)
Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift5.5MixedCyclomatic Complexity: PathHierarchy.findNode (cyclomatic 48)
Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift5.5MixedCyclomatic Complexity: DocumentationCurator.crawlChildren (cyclomatic 34)
Sources/DocCHTML/HTMLFormatter.swift5.6MixedCyclomatic Complexity: _Tag.canOmitEndTag (cyclomatic 30)
Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift5.6MixedCyclomatic Complexity: ParametersAndReturnValidator.makeParametersSectionVariants (cyclomatic 23)
Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift5.6MixedCode Duplication: Edited copy of a member (16 corresponding lines)
Sources/SwiftDocC/Model/Availability.swift5.6MixedCyclomatic Complexity: Availability.finalizePlatformFallbacks (cyclomatic 19)
Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift5.6MixedCognitive Complexity: SymbolGraphRelationshipsBuilder.addImplementationRelationship (cognitive 18)
Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift5.7MixedCyclomatic Complexity: PathHierarchy.utf8TypeSpelling (cyclomatic 37)
Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift5.7MixedCyclomatic Complexity: MarkdownOutputMarkupWalker.visitBlockDirective (cyclomatic 21)
Sources/SwiftDocC/Semantics/Article/Article.swift5.7MixedCyclomatic Complexity: Article.init (cyclomatic 19)

How the grades work

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 — 35

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 — 1153

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 — 175

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 21

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

This survey 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. All 50 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

Every figure here is one of two 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. 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.

What we checked — 50 dimensions across the health lenses
D1D2D3D4D5D6D8D10D11D12D13D14D15D16D17D20D21D27D28D29D30D31D34D35D36D43AC5AX10AX3AX4AX8AX9DM2DM4DM5DM6M1M2M3M4P1P10P2P3P4PF3S1X26X28X3

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
  1. 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, 1346 of 1363 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1dd0e-ba96-7856-b38e-28be1d8ea6f9.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We 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's deterministic call-shape 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. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We 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.
  • D26 Project Cohesion — not measured this run — We 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. `(repository root)` (79098 LoC, 876 module-visible types across 110 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We 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. `Sources/DocCCommandLine/Action/Action.swift`, `Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift`, `Sources/DocCCommandLine/Action/Actions/Merge/MergeAction+SynthesizedLandingPage.swift`, `Sources/DocCCommandLine/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift`, `Sources/DocCCommandLine/ArgumentParsing/ActionExtensions/ConvertAction+CommandInitialization.swift`, … (+91 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 — We 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 REDACTED) is simply not read here yet.
  • AX1 Captive dependencies — not measured this run — We 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in Sources/SwiftDocC/Infrastructure/DocumentationContext.swift, whose lifetimes are not modelled 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.
  • AX6 Interface segregation — not measured this run — We 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.
  • AXR1 Runtime accessibility — not measured this run — We 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. Render strategy: boot via REDACTED (REDACTED). the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence).
  • C1 Data Protection — not measured this run — We 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 — We 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 — We 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 — We 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 Python, 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.
  • IC1 Incompleteness & stubs — not measured this run — We 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 Python, 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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.
  • X12 Unreachable branch — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We 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.
  • X18 Disposal-pattern correctness — not measured this run — We 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.
  • X2 Cancellation propagation — not measured this run — We 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 named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, 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 — We 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 (Vue and Svelte components included), 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.
  • X4 Structured logging — not measured this run — We 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 this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, 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 — We 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 Python, 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 (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do 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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • 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 — we run 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • 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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • 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.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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".

Dimensions

D1 · Cyclomatic Complexity6.3 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.3 / 10 · rule-coverage 100% · ceiling Prevented

68 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PathHierarchy.init at 72. A further 15 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 PageType.renderIndexPageType at 41 — they are counted neither in the figure above nor in this dimension's score. 9 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: Sources/SwiftDocC/Indexing/RenderIndexJSON/RenderIndex.swift (PageType.renderIndexPageType at 41), Sources/SwiftDocC/Infrastructure/Topic Graph/AutomaticCuration.swift (AutomaticCuration.groupTitle at 33), Sources/DocCTestUtilities/SymbolGraphCreation.swift (SymbolGraphCreation.swift.makeSymbolKind at 32), Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift (PageType.init at 24), Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.swift (AnyRenderSection.difference at 24), and 4 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.

PathHierarchy.init (cyclomatic 72)Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:64
FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cyclomatic 66)Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:726
RenderNodeTranslator.visitSymbol (cyclomatic 57)Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304
DocumentationMarkup.init (cyclomatic 49)Sources/SwiftDocC/Model/DocumentationMarkup.swift:110
PathHierarchy.findNode (cyclomatic 48)Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:27

+ 63 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with PathHierarchy.init (cyclomatic 72), FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cyclomatic 66). — 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.4 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity4.8 / 10Weak✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 4.8 / 10 · rule-coverage 100% · ceiling Prevented

103 method(s) exceeded the cognitive complexity threshold of 15; the worst was PathHierarchy.init at 173.

PathHierarchy.findNode::searchForNodeInModules (cognitive 17) · ×2Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:90
PathHierarchy.init (cognitive 173)Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:64
DocumentationMarkup.init (cognitive 116)Sources/SwiftDocC/Model/DocumentationMarkup.swift:110
DocumentationContext.registerSymbols (cognitive 86)Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040
RenderNodeTranslator.visitSymbol (cognitive 85)Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304

+ 97 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with PathHierarchy.init (cognitive 173). — Refactoring it lifts Cognitive Complexity from 4.8 to about 5.3/10.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.4 / 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.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

41 god class(es) detected.

MethodTooLong: RenderNodeTranslator.visitSymbol · ×18Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304
FileTooLong: Infrastructure/DocumentationContext.swift · ×11Sources/SwiftDocC/Infrastructure/DocumentationContext.swift
TooManyMethods: DocumentationContext · ×7Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:37
ClassTooLong: DocumentationContext · ×3Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:37
FunctionTooLong: main.swift.top-level code · ×2Sources/generate-symbol-graph/main.swift:88

What to do

  1. Resolve the 18 MethodTooLong finding(s) in God Classes — start with DocumentationContext.swift (3), RenderNodeTranslator.swift (2), LinkDestinationSummary+FastJSONDecodable.swift. — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 11 FileTooLong finding(s) in God Classes — start with DocumentationContext.swift, RenderNodeTranslator.swift, SymbolGraph+FastJSONDecodable.swift. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 7 TooManyMethods finding(s) in God Classes — start with DocumentationContext.swift, RenderNodeTranslator.swift, MarkdownRenderer.swift. — One of this dimension's main actionable groups (7 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication7.9 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.9 / 10 · rule-coverage 100% · ceiling Verified

88 duplicated block group(s) detected. 5.3 % of the production lines (4,199 of 79,098) are in a reported copy. A further 109 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 197 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.

Edited copy of a member (9 corresponding lines) · ×7Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:341
Duplicated block (9 lines × 2) · ×7Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:934
Duplicated block (8 lines × 2) · ×7Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:121
Duplicated block (6 lines × 2) · ×6Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:105
Duplicated block (5 lines × 2) · ×6Sources/DocCCommandLine/PreviewServer/RequestHandler/DefaultRequestHandler.swift:62

+ 88 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 7 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with RenderNodeTranslator.swift (2), LinkReference.swift, TutorialAssessmentsRenderSection.swift. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with LinkDestinationSummary.swift (2), SymbolGraph+FastJSONDecodable.swift, SymbolGraphRelationshipsBuilder.swift. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 7 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with SymbolGraph+FastJSONDecodable.swift (3), LinkDestinationSummary+FastJSONDecodable.swift, DirectiveArgumentWrapper.swift. — One of this dimension's main actionable groups (7 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling10.0 / 10Exemplary✓ 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

12 production modules (SwiftPM+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 7 of the 12 (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: DocCCommon (SwiftPM)

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)8.0 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

11 of 65 classes have LCOM4 above 3.

Low cohesion: AnyCheckerBox (LCOM4 21) · ×11Sources/SwiftDocC/Checker/Checker.swift:45

What to do

  1. Resolve the 11 Low cohesion finding(s) in Cohesion (LCOM4) — start with FastSymbolGraphJSONDecoder.swift (2), Checker.swift, MarkdownRenderer.swift. — One of this dimension's main actionable groups (11 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D8 · Code Coverage5.0 / 10Adequate✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Verified

Line coverage 0.2% — 461 file(s) below 50%. Measured from the Swift suite (.: no coverage export; bin/benchmark: `swift test --enable-code-coverage` over 462 production file(s)).

Low coverage: Sources/DocCCommon/FixedSizeBitSet.swift · ×461Sources/DocCCommon/FixedSizeBitSet.swift:1

What to do

  1. Resolve the 461 Low coverage finding(s) in Code Coverage — start with FixedSizeBitSet.swift, FastSymbolGraphJSONDecoder.swift, SymbolGraph+FastJSONDecodable.swift. — One of this dimension's main actionable groups (461 warning-level).

Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.0 / 10Stronggated by 139 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.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Prevented

23 skipped (14 with a documented reason), 158 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 2167 tests (1 harness-style project(s) excluded from the assertion penalty).

No assertions: testCreationOfAssetFolders · ×130Tests/DocCCommandLineTests/ConvertActionTests.swift:190
Skipped test: testTrappingSignal · ×9Tests/DocCCommandLineTests/SignalTests.swift:33
No direct assertions: renderingBreadcrumbs · ×28Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:20
Skipped (documented): fillsInFallbackAvailabilityFromDefaultAvailability · ×14Tests/SwiftDocCTests/Model/AvailabilityTests.swift:26

What to do

  1. Resolve the 130 No assertions finding(s) in Test Quality — start with LinkDestinationSummary+DecodingTests.swift (22), SemaToRenderNodeTests.swift (12), FastSymbolGraphJSONDecoderErrorTests.swift (10). — One of this dimension's main actionable groups (130 warning-level).
  2. Resolve the 28 No direct assertions finding(s) in Test Quality — start with MarkdownRendererTests.swift (17), MarkdownRenderer+PageElementsTests.swift (10), WordBreakTests.swift. — One of this dimension's main actionable groups (28 recommendation-level).
  3. Resolve the 9 Skipped test finding(s) in Test Quality — start with LogHandleTests.swift (3), ConvertServiceTests.swift (3), NavigatorIndexTests.swift (2). — One of this dimension's main actionable groups (9 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 flaky across 1 measured tier(s). Swift (2 packages): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.1 5.2 / 10Adequate✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 5.2 / 10 · rule-coverage 57% · ceiling Verified

3 outdated direct SwiftPM dependencies, 3 pinning defect(s). 4 of 7 direct dependencies had their releases listed (0 naming no readable repository, 3 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Floating branch dependency: swift-markdown · ×3
Outdated: swift-argument-parser · ×3

What to do

  1. Resolve the 3 Floating branch dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 12 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 11 of them read from the licence file the repository carries at the revision REDACTED pins, and 1 — 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 REDACTED pins, direct and transitive, and every declared dependency none pins. 2 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.6 / 10Stronggated by 14 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: Sources/SwiftDocC/Infrastructure/DocumentationContext.swift (12×36=432); Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift (7×57=399); Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift (10×32=320)

Hotspot: Sources/SwiftDocC/Infrastructure/DocumentationContext.swift · ×14Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040

What to do

  1. Resolve the 14 Hotspot finding(s) in Churn × Complexity Hotspots — start with DocumentationContext.swift, RenderNodeTranslator.swift, HTMLRenderer.swift. — One of this dimension's main actionable groups (14 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.6 / 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.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 100% · ceiling Documented

50 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift. Counted over 323 of the 557 production source files in this repository: 231 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. 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.

D17 · Explicit Debt9.7 / 10Stronggated by 124 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Prevented

124 deducted task-comment markers across 79098 LoC (0.2/KLoC) → score 9.7. 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.

FixmeComment · ×83Tests/SwiftDocCTests/Semantics/MetadataAvailabilityTests.swift:132
TodoComment · ×41Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift:61

What to do

  1. Resolve the 83 FixmeComment finding(s) in Explicit Debt — start with NavigatorIndex.swift (19), AvailabilityTests.swift (5), HTMLRenderer+FullPage.swift (4). — One of this dimension's main actionable groups (83 warning-level).
  2. Resolve the 41 TodoComment finding(s) in Explicit Debt — start with HTMLRenderer.swift (6), MarkdownOutputSemanticVisitor.swift (4), ConvertActionConverter.swift (3). — One of this dimension's main actionable groups (41 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundPackage.swift:76

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Package.swift. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency7.1 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 100% · ceiling Verified

3 naming inconsistencies among 103 declarations measured against a convention their peers follow.

`baseUrl` spells `Url` where 103 names in the project spell it `URL` · ×2Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift:222
`encodeUrlVerbatim` spells `Url` where 103 names in the project spell it `URL`Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift:39

What to do

  1. Resolve the 2 `baseUrl` spells `Url` where 103 names in the project spell it `URL` finding(s) in Naming Consistency — start with DiagnosticConsoleWriter.swift (2). — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 `encodeUrlVerbatim` spells `Url` where 103 names in the project spell it… finding(s) in Naming Consistency — start with DownloadReference.swift. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability9.3 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

21 % of calls cross a namespace and 15 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)5.0 / 10Adequate✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

11 finding(s): 0 critical, 11 high, 0 medium, 0 low. 7 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) — `bin/check-source` (line 117, line 129) — 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

  1. 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).
  2. 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).
  3. No action in Static Analysis (SAST) — all 3 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 (3 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 0 high, 1 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness6.5 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 6.5 / 10 · rule-coverage 100% · ceiling Documented

111 of 326 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/SwiftDocC/Infrastructure/Symbol Graph/ExtendedTypeFormatTransformation.swift. Counted over 326 of the 557 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×4Sources/SwiftDocC/Infrastructure/Symbol Graph/ExtendedTypeFormatTransformation.swift:1
Orphaned file · ×107Sources/SwiftDocC/Infrastructure/Topic Graph/TopicGraph.swift:1
Further orphaned files (smaller)

What to do

  1. Resolve the 107 Orphaned file finding(s) in Knowledge Freshness — start with TopicGraph.swift, Kind.swift, AutomaticDirectiveConvertible.swift. — One of this dimension's main actionable groups (107 recommendation-level).
  2. Resolve the 4 Orphaned knowledge finding(s) in Knowledge Freshness — start with ExtendedTypeFormatTransformation.swift, NavigatorTree.swift, RenderMetadata.swift. — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 1 Further orphaned files (smaller) 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.

D35 · Change Coupling9.9 / 10Stronggated by 2 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: SymbolGraphLoader.swift↔DefaultAvailability.swift 55%; RenderContentCompiler.swift↔MarkupReferenceResolver.swift 50%

Change coupling: SymbolGraphLoader.swift ↔ DefaultAvailability.swift · ×2Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift:1

What to do

  1. Resolve the 2 Change coupling finding(s) in Change Coupling — start with SymbolGraphLoader.swift, RenderContentCompiler.swift. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AX10 · Code composition7.8 / 10Strong✓ Tool-verified

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.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

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.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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.

DM2 · Strongly-typed ids9.8 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain identifiers are strongly typed (a typed-id struct) rather than raw primitives — consistency once an idiom exists.

Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.

Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.

  • `SourceLanguage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/DocCCommon/SourceLanguage.swift:161
  • `SourceLanguage.linkDisambiguationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/DocCCommon/SourceLanguage.swift:169
  • `SourceLanguage.taskGroupID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/DocCCommon/SourceLanguage.swift:260
  • `_SourceLanguageInformation.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/DocCCommon/SourceLanguage.swift:37
  • `_SourceLanguageInformation.linkDisambiguationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/DocCCommon/SourceLanguage.swift:39
  • `Metric.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Benchmark/BenchmarkResults.swift:65
  • `InterfaceLanguage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Indexing/Navigator/AvailabilityIndex+Ext.swift:84
  • `NavigatorItem.availabilityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift:42
  • `Node.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:395
  • `RenderMetadataVariantView.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Indexing/Navigator/RenderNode+NavigatorIndex.swift:84
  • `SVGIDParserDelegate.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Infrastructure/Bundle Assets/SVGIDExtractor.swift:52
  • `Diagnostic.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticFile.swift:48
  • `Diagnostic.groupID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticFile.swift:49
  • `ExternalRenderNodeMetadataRepresentation.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Infrastructure/Link Resolution/LinkResolver+NavigatorIndex.swift:152
  • `Symbol.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:637
  • `VariantProxy.svgID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:94
  • `RenderMetadata.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value. — Sources/SwiftDocC/Model/Rendering/RenderNode/RenderMetadata.swift:98

What to do

  • Adopt the repo's typed-id idiom consistently — wrap every entity identity in its own typed id.
DM4 · Rich vs anemic domain model7.3 / 10Strong✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour — a data-only reference entity whose logic lives in a foreign service is anemic. Rich models enforce their own invariants.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

  • `_Tag` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/DocCHTML/HTMLFormatter.swift:469
  • `BlockDirective` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside. — Sources/SwiftDocC/Model/DocumentationNode.swift:1115

What to do

  • Move delegated behaviour onto the domain entity (or make it a value object); keep invariants inside the type.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a reference entity protects its own invariants — a class whose identity is a computed content hash but whose hashed fields are publicly mutable bypasses that invariant. Encapsulated state keeps identity-bearing fields immutable.

Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain entity fused to a persistence ORM on its own declaration (active-record), or reaching a web-framework transport type in its own method, couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

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.
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability5.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

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 2 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. — REDACTED:7

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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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 each language's code 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.

S1 · Web-Security Posture8.0 / 10Strong✓ Tool-verified

Other · Security — Only what this repository's own non-C# files could be read for was assessed — markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `https://swift.org/assets/javascripts/docc/footer.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup. — Sources/DocCCommandLine/CommandLine.docc/footer.html:10

What to do

  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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.

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.

X3 · Exception handling7.5 / 10Strong✓ Tool-verified

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. — Sources/SwiftDocC/DocumentationService/Convert/Symbol Link Resolution/LinkCompletionTools.swift:225

What to do

  • Swallowed exception (caught, then discarded)

WCAG coverage — what static analysis assessed

Statically assessed 1 of 55 WCAG 2.2 Level A/AA success criteria (2%; ≈2% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 54 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC5 · ARIA correctness4.1.2Partial signal

Not statically assessed — these 54 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.1, 2.2.2, 2.3.1, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.1, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.2, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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.

LensScoreRatingImpact
Code Health78%StrongSolid.
Architecture91%ExemplarySolid.
Maturity57%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness56%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security70%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling90%StrongSolid.
Accessibility100%ExemplaryStrongest area.
Performance100%ExemplarySolid.
Unscored — 2 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.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 68 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
  • AC3 Page structure — No structural check found in the parsed markup — AC3 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC6 Visual & motion safety — No styled element found in the parsed markup — AC6 not applicable here.
  • AX1 Captive dependencies — 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
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. 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
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the image ran but published no HTTP port — nothing to crawl (EXPOSE the web port to unlock runtime evidence) This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • 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.
  • 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.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Swift surface was not measured.
  • 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+ sibling projects each declaring an entity of their own or taking another project's integration events. 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#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .py, .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
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 96 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.
  • 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.
  • 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
  • DM1 Aggregate boundaries — not scored for Swift: the sidecar flattens array/collection types (a child COLLECTION = legitimate membership vs a single embedded aggregate is indistinguishable), and aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike) — reported as guidance rather than measured
  • DM3 Integration-event coupling — not scored for Swift: a cross-SwiftPM-target domain leak cannot be told apart in source from a legitimate shared-kernel/contracts module, and most repositories ship a single module — reported as guidance rather than measured
  • DM7 Repository granularity — not scored for Swift: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • 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 Python, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 462 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • 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.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — swift (78,717 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • 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.

Critical — 35 finding(s)
DM2 · Strongly-typed ids · Raw-primitive id despite a typed-id idiom · ×17
  • Raw-primitive id despite a typed-id idiom: SourceLanguage.id Sources/DocCCommon/SourceLanguage.swift:161 — `SourceLanguage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SourceLanguage.linkDisambiguationID Sources/DocCCommon/SourceLanguage.swift:169 — `SourceLanguage.linkDisambiguationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SourceLanguage.taskGroupID Sources/DocCCommon/SourceLanguage.swift:260 — `SourceLanguage.taskGroupID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: _SourceLanguageInformation.id Sources/DocCCommon/SourceLanguage.swift:37 — `_SourceLanguageInformation.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: _SourceLanguageInformation.linkDisambiguationID Sources/DocCCommon/SourceLanguage.swift:39 — `_SourceLanguageInformation.linkDisambiguationID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Metric.id Sources/SwiftDocC/Benchmark/BenchmarkResults.swift:65 — `Metric.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: InterfaceLanguage.id Sources/SwiftDocC/Indexing/Navigator/AvailabilityIndex+Ext.swift:84 — `InterfaceLanguage.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: NavigatorItem.availabilityID Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift:42 — `NavigatorItem.availabilityID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Node.id Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:395 — `Node.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: RenderMetadataVariantView.externalID Sources/SwiftDocC/Indexing/Navigator/RenderNode+NavigatorIndex.swift:84 — `RenderMetadataVariantView.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: SVGIDParserDelegate.id Sources/SwiftDocC/Infrastructure/Bundle Assets/SVGIDExtractor.swift:52 — `SVGIDParserDelegate.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Diagnostic.id Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticFile.swift:48 — `Diagnostic.id` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Diagnostic.groupID Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticFile.swift:49 — `Diagnostic.groupID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: ExternalRenderNodeMetadataRepresentation.externalID Sources/SwiftDocC/Infrastructure/Link Resolution/LinkResolver+NavigatorIndex.swift:152 — `ExternalRenderNodeMetadataRepresentation.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: Symbol.externalID Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:637 — `Symbol.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: VariantProxy.svgID Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:94 — `VariantProxy.svgID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
  • Raw-primitive id despite a typed-id idiom: RenderMetadata.externalID Sources/SwiftDocC/Model/Rendering/RenderNode/RenderMetadata.swift:98 — `RenderMetadata.externalID` is a raw primitive id while the repo already defines typed-id wrappers — an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can't be confused with another entity's id or a plain value.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×4
  • Orphaned knowledge Sources/SwiftDocC/Infrastructure/Symbol Graph/ExtendedTypeFormatTransformation.swift:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Sources/SwiftDocC/Model/Rendering/RenderNode/RenderMetadata.swift:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
  • Orphaned knowledge Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
DM4 · Rich vs anemic domain model · Anemic domain model · ×2
  • Anemic domain model: _Tag Sources/DocCHTML/HTMLFormatter.swift:469 — `_Tag` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
  • Anemic domain model: BlockDirective Sources/SwiftDocC/Model/DocumentationNode.swift:1115 — `BlockDirective` is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) — the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
Serious — 1153 finding(s)
D8 · Code Coverage · Low coverage · ×461
  • Low coverage: Sources/DocCCommon/FixedSizeBitSet.swift Sources/DocCCommon/FixedSizeBitSet.swift:1 — 0.0% line coverage (0/185).
  • Low coverage: Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:1 — 0.0% line coverage (0/1108).
  • Low coverage: Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1 — 0.0% line coverage (0/1444).
  • Low coverage: Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:1 — 0.0% line coverage (0/367).
  • Low coverage: Sources/DocCCommon/SourceLanguage.swift Sources/DocCCommon/SourceLanguage.swift:1 — 0.0% line coverage (0/283).
  • Low coverage: Sources/DocCHTML/HTMLFormatter.swift Sources/DocCHTML/HTMLFormatter.swift:1 — 0.0% line coverage (0/474).
  • Low coverage: Sources/DocCHTML/HTMLNode+Attributes.swift Sources/DocCHTML/HTMLNode+Attributes.swift:1 — 0.0% line coverage (0/126).
  • Low coverage: Sources/DocCHTML/HTMLNode+Tags.swift Sources/DocCHTML/HTMLNode+Tags.swift:1 — 0.0% line coverage (0/442).
  • Low coverage: Sources/DocCHTML/HTMLNode+fromXMLNode.swift Sources/DocCHTML/HTMLNode+fromXMLNode.swift:1 — 0.0% line coverage (0/45).
  • Low coverage: Sources/DocCHTML/HTMLNode.swift Sources/DocCHTML/HTMLNode.swift:1 — 0.0% line coverage (0/71).
  • Low coverage: Sources/DocCHTML/LinkProvider.swift Sources/DocCHTML/LinkProvider.swift:1 — 0.0% line coverage (0/15).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Availability.swift Sources/DocCHTML/MarkdownRenderer+Availability.swift:1 — 0.0% line coverage (0/76).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Breadcrumbs.swift Sources/DocCHTML/MarkdownRenderer+Breadcrumbs.swift:1 — 0.0% line coverage (0/87).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Declaration.swift Sources/DocCHTML/MarkdownRenderer+Declaration.swift:1 — 0.0% line coverage (0/551).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Discussion.swift Sources/DocCHTML/MarkdownRenderer+Discussion.swift:1 — 0.0% line coverage (0/17).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Parameters.swift Sources/DocCHTML/MarkdownRenderer+Parameters.swift:1 — 0.0% line coverage (0/103).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Relationships.swift Sources/DocCHTML/MarkdownRenderer+Relationships.swift:1 — 0.0% line coverage (0/86).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Returns.swift Sources/DocCHTML/MarkdownRenderer+Returns.swift:1 — 0.0% line coverage (0/50).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer+Topics.swift Sources/DocCHTML/MarkdownRenderer+Topics.swift:1 — 0.0% line coverage (0/150).
  • Low coverage: Sources/DocCHTML/MarkdownRenderer.swift Sources/DocCHTML/MarkdownRenderer.swift:1 — 0.0% line coverage (0/786).
  • Low coverage: Sources/DocCHTML/SourceLanguage+Attribute.swift Sources/DocCHTML/SourceLanguage+Attribute.swift:1 — 0.0% line coverage (0/3).
  • Low coverage: Sources/DocCHTML/WordBreak.swift Sources/DocCHTML/WordBreak.swift:1 — 0.0% line coverage (0/64).
  • Low coverage: Sources/SwiftDocC/Benchmark/Benchmark.swift Sources/SwiftDocC/Benchmark/Benchmark.swift:1 — 0.0% line coverage (0/74).
  • Low coverage: Sources/SwiftDocC/Benchmark/BenchmarkResults.swift Sources/SwiftDocC/Benchmark/BenchmarkResults.swift:1 — 0.0% line coverage (0/128).
  • Low coverage: Sources/SwiftDocC/Benchmark/Metrics/Duration.swift Sources/SwiftDocC/Benchmark/Metrics/Duration.swift:1 — 0.0% line coverage (0/19).
  • + 436 more in this group — see findings.md.
D10 · Test Quality · No assertions · ×130
  • No assertions: testCreationOfAssetFolders Tests/DocCCommandLineTests/ConvertActionTests.swift:190 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertDoesNotLowercasesResourceFileNames Tests/DocCCommandLineTests/ConvertActionTests.swift:349 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testDoesNotIncludeDiagnosticsInThrownError Tests/DocCCommandLineTests/ConvertActionTests.swift:1996 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testCreatesBuildMetadataFileForBundleWithInfoPlistValues Tests/DocCCommandLineTests/ConvertActionTests.swift:2144 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertDocCCatalogThatProducesNoDocumentationDoesNotThrowError Tests/DocCCommandLineTests/ConvertActionTests.swift:2179 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertDocCCatalogThatProducesMultipleDocumentationPagesAtTheSamePathDoesNotThrowError Tests/DocCCommandLineTests/ConvertActionTests.swift:2256 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertWithCustomTemplates Tests/DocCCommandLineTests/ConvertActionTests.swift:2289 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertWithCustomTemplatesForStaticHosting Tests/DocCCommandLineTests/ConvertActionTests.swift:2355 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testConvertWithThemeSettings Tests/DocCCommandLineTests/ConvertActionTests.swift:2436 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testMonitorUpdates Tests/DocCCommandLineTests/DirectoryMonitorTests.swift:118 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testMonitorZeroSumSizeChangesUpdates Tests/DocCCommandLineTests/DirectoryMonitorTests.swift:200 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testVerifyingPartialFolderHierarchy Tests/DocCCommandLineTests/FolderStructureTests.swift:69 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testThrowsHumanFriendlyErrorWhenCannotStartServerOnAGivenPort Tests/DocCCommandLineTests/PreviewActionIntegrationTests.swift:191 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingIntWhenDataIsNull Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:20 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingIntWhenDataIsEmpty Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:25 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingIntWhenNumberIsTooLarge Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:30 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingIntWhenDataIsOtherType Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:36 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingBoolWhenDataIsOtherType Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:47 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingStringWhenDataIsOtherType Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:58 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingSemanticVersionWhenDataIsEmptyObject Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:69 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingInvalidIntRanges Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:74 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingInnerValueWithWrongTypeInSecondElement Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:86 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: decodingRecursiveValueWithMissingValueDeepDown Tests/DocCCommonTests/FastSymbolGraphJSONDecoderErrorTests.swift:106 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testNavigatorIndexGenerationVariantsPayload Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift:812 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: testNavigatorIndexGenerationVariantsPayloadIgnoringLanguage Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift:816 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
  • + 105 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×83
  • FixmeComment Tests/SwiftDocCTests/Semantics/MetadataAvailabilityTests.swift:132 — // FIXME: Test validArguments with the `*` platform once that's introduced (https://github.com/swiftlang/swift-docc/issues/969)
  • FixmeComment Tests/SwiftDocCTests/Rendering/DeclarationsRenderSectionTests.swift:348 — // FIXME: adjust the token processing so that the comma inside the tuple isn't treated as common? — 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/SwiftDocCTests/Rendering/DeclarationsRenderSectionTests.swift:353 — // FIXME: adjust the token processing so that the common parenthesis is always the final one — 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/SwiftDocCTests/Model/AvailabilityTests.swift:1754 — // FIXME: Articles don't display or consider DeprecationSummary information (rdar://173688303) — 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/SwiftDocCTests/Model/AvailabilityTests.swift:1961 — // FIXME: Articles don't display default availability (rdar://173688303) — 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/SwiftDocCTests/Model/AvailabilityTests.swift:2071 — // FIXME: Articles don't display default availability (rdar://173688303) — 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/SwiftDocCTests/Model/AvailabilityTests.swift:2294 — // FIXME: Articles don't display default availability (rdar://173688303) — 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/SwiftDocCTests/Model/AvailabilityTests.swift:1962 — // FIXME: Articles are not considered in-beta for any source of availability (rdar://173773442) — 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/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift:657 — // FIXME: Symbol semantics and RenderContext doesn't consider pages deprecated when all their platforms are deprecated (rdar://172273148) — 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/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift:810 — // FIXME: Articles don't consider the availability information from directives. (rdar://172280267) — 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/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift:818 — // FIXME: Add tests that verify the behaviors of mixing in-source availability attributes and Available directives (rdar://171807245) — 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/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift:1549 — // FIXME: Verify that article matches are preferred for general (non-symbol) links once https://github.com/swiftlang/swift-docc/issues/593 is fixed
  • FixmeComment Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift:2892 — // FIXME: Verify that article matches are preferred for general (non-symbol) links once rdar://79745455 https://github.com/swiftlang/swift-docc/issues/593 is fixed
  • FixmeComment Tests/SwiftDocCTests/Infrastructure/PathHierarchyTests.swift:2900 — // FIXME: Verify that article matches are preferred for general (non-symbol) links once rdar://79745455 https://github.com/swiftlang/swift-docc/issues/593 is fixed
  • FixmeComment Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift:2530 — // FIXME: Verify that article matches are preferred for general (non-symbol) links once rdar://79745455 https://github.com/swiftlang/swift-docc/issues/593 is fixed
  • FixmeComment Tests/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift:51 — // FIXME: The ranges for Link destination elements is offset by 2. — 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/SwiftDocCTests/Infrastructure/DocumentationContext/DocumentationContextTests.swift:2861 — // FIXME: A Discussion section is incorrectly getting created because of a comment. Comments shouldn't be — 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/SwiftDocCTests/Indexing/ExternalRenderNodeTests.swift:303 — // FIXME: This should ideally be solved by making the article language-agnostic rather than accomodating the "Swift" language and special-casing for non-symbols. — 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/SwiftDocCTests/DocumentationService/ConvertService/ConvertServiceTests.swift:2472 — // FIXME: Ideally, tests should not rely on the filesystem. Clean this up in the future. — 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/DocCCommandLineTests/ConvertActionTests.swift:1539 — // FIXME: This test has never used different batch sizes. (rdar://137885335) — 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/SwiftDocC/Utility/FileManagerProtocol+FilesSequence.swift:24 — // FIXME: This should be private and `FileManagerProtocol.recursiveFiles(startingPoint:options:)` should return `some Sequence<ULR>` — 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/SwiftDocC/Semantics/ReferenceResolver.swift:17 — // FIXME: Finding the range for the link's destination is better suited for Swift-Markdown — 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/SwiftDocC/Semantics/ReferenceResolver.swift:23 — // FIXME: This assumes that the link uses the `<doc:my/reference>` 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 Sources/SwiftDocC/Semantics/ReferenceResolver.swift:230 — // FIXME: The resolved reference path isn't the same as the authorable link. — 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/SwiftDocC/Model/DocumentationNode.swift:949 — // FIXME: Share this logic for computing the availability with the rendering code (rdar://172280267) — 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.
  • + 58 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×41
  • TodoComment Tests/SwiftDocCTests/Model/SemaToRenderNodeTests.swift:61 — // TODO: XcodeRequirement check — 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/SwiftDocCTests/LinkTargets/LinkDestinationSummaryTests.swift:349 — // TODO: DataAsset doesn't round-trip encode/decode — 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/SwiftDocCTests/Infrastructure/ResolvedTopicReferenceTests.swift:80 — // TODO: Run TSan in Swift-CI (rdar://90157829). — 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/SwiftDocCTests/Diagnostics/DiagnosticTests.swift:189 — // TODO: Consider adding a diagnostic for Doxygen tags (rdar://92184094) — 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/DocCHTMLTests/HTMLFormatterTests.swift:293 — // TODO: Update these initializers after https://github.com/swiftlang/swift-docc/pull/1578 is merged.
  • TodoComment Tests/DocCCommandLineTests/FolderStructure.swift:64 — // TODO: Replace this with PropertListDecoder (see below) when it's available in swift-corelibs-foundation — 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/DocCCommandLineTests/ArgumentParsing/ErrorMessageTests.swift:32 — // TODO: This catch isn't thrown. This test should be fixed. — 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/SwiftDocC/Servers/DocumentationSchemeHandler.swift:99 — // TODO: add handler for a stop — 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/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:111 — // TODO: Use DateComponentsFormatter once it's available on Linux (rdar://59787899) 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.
  • TodoComment Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1758 — // TODO: Warn about using `@DeprecationSummmary` for non-deprecated pages, — 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/SwiftDocC/Model/Rendering/SemanticVersion.swift:54 — // TODO: https://github.com/swiftlang/swift-docc/issues/970
  • TodoComment Sources/SwiftDocC/Model/Rendering/Tutorial/LineHighlighter.swift:116 — // TODO: Collect intra-line diffs. — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer+FullPage.swift:12 — // TODO: Consider other HTML rendering options as a future improvement (rdar://165755530) — 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/DocCHTML/HTMLNode+fromXMLNode.swift:12 — // TODO: Consider other HTML rendering options as a future improvement (rdar://165755530) — 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/DocCHTML/MarkdownRenderer.swift:12 — // TODO: Consider other HTML rendering options as a future improvement (rdar://165755530) — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:27 — // TODO: Support returning information about external pages (rdar://165912415) — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:219 — // TODO: Support language specific topic sections, indicated using @SupportedLanguage directives (rdar://166308418) — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:382 — // TODO: Support language specific topic sections, indicated using @SupportedLanguage directives (rdar://166308418) — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:305 — // TODO: Display platform specific declarations — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:318 — // TODO: Constraints — 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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:584 — // TODO: Design and implement a better solution for representing language specific variations of a value (rdar://166211961) — 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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:13 — //TODO: rdar://166607119 consider an alternative to a semantic visitor for this work — 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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:354 — // TODO: add support for missing sections rdar://166124742 — 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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:568 — // TODO: Add support for tutorial articles rdar://166124907 — 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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:573 — // TODO: Add support for stacks rdar://166608793 — 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.
  • + 16 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×18
  • MethodTooLong: RenderNodeTranslator.visitSymbol Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304 — MethodTooLong — visitSymbol runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× 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: FastSymbolGraphJSONDecoder.decodeAnyRenderReference Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:726 — MethodTooLong — decodeAnyRenderReference runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.23× 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: DocumentationContext.registerSymbols Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040 — MethodTooLong — registerSymbols runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× 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: RenderNodeTranslator.visitArticle Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:630 — MethodTooLong — visitArticle runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: AutomaticDirectiveConvertible.init Sources/SwiftDocC/Semantics/DirectiveInfrastructure/AutomaticDirectiveConvertible.swift:116 — MethodTooLong — init runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× 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: ConvertAction._perform Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:246 — MethodTooLong — _perform runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: DocumentationContext.register Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2073 — MethodTooLong — register runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: DeclarationsSectionTranslator.translateSection Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:71 — MethodTooLong — translateSection runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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: ConvertActionConverter.convert Sources/SwiftDocC/Infrastructure/ConvertActionConverter.swift:36 — MethodTooLong — convert runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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: DocumentationContext.registerDocuments Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:720 — MethodTooLong — registerDocuments 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.
  • MethodTooLong: DocumentationCurator.crawlChildren Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:158 — MethodTooLong — crawlChildren runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× 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: Symbol.init Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:403 — MethodTooLong — init runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: Error.makeTopicReferenceResolutionErrorInfo Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift:90 — MethodTooLong — makeTopicReferenceResolutionErrorInfo runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× 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: HTMLRenderer.renderSymbol Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:246 — MethodTooLong — renderSymbol runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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: Symbol.init Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:286 — MethodTooLong — init runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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: PathHierarchy.findNode Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:27 — MethodTooLong — findNode 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: DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol Sources/SwiftDocC/Model/DocumentationNode.swift:934 — MethodTooLong — warnAboutDeprecationSummaryForAvailableSymbol 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: DocumentationContentRenderer.renderReference Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:265 — MethodTooLong — renderReference 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×14
  • Hotspot: Sources/SwiftDocC/Infrastructure/DocumentationContext.swift Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in DocumentationContext.registerSymbols at line 1040. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Infrastructure/DocumentationContext.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/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in RenderNodeTranslator.visitSymbol at line 1304. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.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/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:246 — Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in HTMLRenderer.renderSymbol at line 246. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.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/SwiftDocC/Infrastructure/ConvertActionConverter.swift Sources/SwiftDocC/Infrastructure/ConvertActionConverter.swift:36 — Sources/SwiftDocC/Infrastructure/ConvertActionConverter.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ConvertActionConverter.convert at line 36. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Infrastructure/ConvertActionConverter.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/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:246 — Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in ConvertAction._perform at line 246. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.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/SwiftDocC/LinkTargets/LinkDestinationSummary.swift Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:968 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in LinkDestinationSummary.== at line 968. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.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/SwiftDocC/Semantics/Symbol/Symbol.swift Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:286 — Sources/SwiftDocC/Semantics/Symbol/Symbol.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in Symbol.init at line 286. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Semantics/Symbol/Symbol.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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:213 — Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in MarkdownOutputSemanticVisitor.visitSymbol at line 213. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.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/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:16 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in LinkDestinationSummary.init at line 16. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.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/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:89 — Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ConvertFileWritingConsumer.consume at line 89. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.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/SwiftDocC/Semantics/Article/Article.swift Sources/SwiftDocC/Semantics/Article/Article.swift:132 — Sources/SwiftDocC/Semantics/Article/Article.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Article.init at line 132. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Semantics/Article/Article.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/DocCHTML/HTMLFormatter.swift Sources/DocCHTML/HTMLFormatter.swift:180 — Sources/DocCHTML/HTMLFormatter.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in HTMLFormatter._prettyFormat at line 180. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/DocCHTML/HTMLFormatter.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/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:353 — Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MarkdownOutputMarkupWalker.visitBlockDirective at line 353. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.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/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:71 — Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in DeclarationsSectionTranslator.translateSection at line 71. 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-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 08:33:23 -08:00' --until='2026-11-12 08:33:23 -08:00' --full-history --no-merges -- Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.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.
D3 · God Classes · FileTooLong · ×11
  • FileTooLong: Infrastructure/DocumentationContext.swift Sources/SwiftDocC/Infrastructure/DocumentationContext.swift — FileTooLong — 1741 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: DocumentationContext (37-3185). The bar is 500 significant lines; this is 1241 over it, 3.48× 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: Rendering/RenderNodeTranslator.swift Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift — FileTooLong — 1210 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: RenderNodeTranslator (21-2060). The bar is 500 significant lines; this is 710 over it, 2.42× 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: JSONDecoding/SymbolGraph+FastJSONDecodable.swift Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift — FileTooLong — 884 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 384 over it, 1.77× 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: LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift — FileTooLong — 813 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 313 over it, 1.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: Navigator/NavigatorIndex.swift Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift — FileTooLong — 751 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 251 over it, 1.50× 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: Model/DocumentationNode.swift Sources/SwiftDocC/Model/DocumentationNode.swift — FileTooLong — 679 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DocumentationNode (20-1104). The bar is 500 significant lines; this is 179 over it, 1.36× 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: Infrastructure/CoverageDataEntry.swift Sources/SwiftDocC/Infrastructure/CoverageDataEntry.swift — FileTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 174 over it, 1.35× 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: Content/RenderBlockContent.swift Sources/SwiftDocC/Model/Rendering/Content/RenderBlockContent.swift — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× 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: LinkTargets/LinkDestinationSummary.swift Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift — FileTooLong — 617 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 117 over it, 1.23× 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: JSONDecoding/FastSymbolGraphJSONDecoder.swift Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift — FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 113 over it, 1.23× 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: Link Resolution/PathHierarchy.swift Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift — FileTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 38 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×11
  • Low cohesion: AnyCheckerBox (LCOM4 21) Sources/SwiftDocC/Checker/Checker.swift:45 — AnyCheckerBox's methods fall into 21 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 21 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 12) Sources/DocCHTML/MarkdownRenderer.swift:947 — String's methods fall into 12 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 12 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: Array (LCOM4 10) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:1166 — Array's methods fall into 10 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 10 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: Sequence (LCOM4 10) Sources/SwiftDocC/Indexing/Indexable.swift:44 — Sequence's methods fall into 10 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 10 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: Collection (LCOM4 10) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:1110 — Collection's methods fall into 10 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 10 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: Symbol (LCOM4 9) Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:92 — Symbol'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: FileManager (LCOM4 6) Sources/DocCTestUtilities/XCTestCase+TemporaryDirectory.swift:16 — FileManager'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: Optional (LCOM4 5) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:1172 — Optional's methods fall into 5 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 5 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: Markup (LCOM4 5) Sources/SwiftDocC/Model/DocumentationMarkup.swift:308 — Markup's methods fall into 5 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 5 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: Node (LCOM4 4) Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:392 — Node'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.
  • Low cohesion: DocumentationContentRenderer (LCOM4 4) Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:48 — DocumentationContentRenderer'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.
D10 · Test Quality · Skipped test · ×9
  • Skipped test: testTrappingSignal Tests/DocCCommandLineTests/SignalTests.swift:33 — Skipped — throws XCTSkip
  • Skipped test: testWriteToStandardOutput Tests/DocCCommandLineTests/Utility/LogHandleTests.swift:19 — Skipped — throws XCTSkip
  • Skipped test: testFlushesStandardOutput Tests/DocCCommandLineTests/Utility/LogHandleTests.swift:59 — Skipped — throws XCTSkip
  • Skipped test: testFlushesStandardError Tests/DocCCommandLineTests/Utility/LogHandleTests.swift:80 — Skipped — throws XCTSkip
  • Skipped test: testNavigationTreeLargeDumpAndRead Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift:374 — Skipped — throws XCTSkip
  • Skipped test: testNavigatorIndexAsReadOnlyFile Tests/SwiftDocCTests/Indexing/NavigatorIndexTests.swift:1830 — Skipped — throws XCTSkip
  • Skipped test: testReturnsRenderReferenceStoreWhenRequestedForOnDiskBundleWithUncuratedArticles Tests/SwiftDocCTests/DocumentationService/ConvertService/ConvertServiceTests.swift:1500 — Skipped — throws XCTSkip
  • Skipped test: testNoRenderReferencesToNonLinkableNodes Tests/SwiftDocCTests/DocumentationService/ConvertService/ConvertServiceTests.swift:1629 — Skipped — throws XCTSkip
  • Skipped test: testReturnsRenderReferenceStoreWhenRequestedForOnDiskBundleWithCuratedArticles Tests/SwiftDocCTests/DocumentationService/ConvertService/ConvertServiceTests.swift:1671 — Skipped — throws XCTSkip
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: DocumentationContext Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:37 — TooManyMethods — 78 methods, declared across 4 files: Infrastructure/DocumentationContext.swift (73), Infrastructure/DocumentationContext+Breadcrumbs.swift (3), Actions/PreviewAction.swift (1), Link Resolution/LinkResolver.swift (1). The bar is 30 methods; this is 48 over it, 2.60× 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: RenderNodeTranslator Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:21 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× 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.
  • TooManyMethods: MarkdownRenderer Sources/DocCHTML/MarkdownRenderer.swift:36 — TooManyMethods — 56 methods, declared across 9 files: DocCHTML/MarkdownRenderer.swift (38), DocCHTML/MarkdownRenderer+Parameters.swift (4), DocCHTML/MarkdownRenderer+Topics.swift (4), DocCHTML/MarkdownRenderer+Declaration.swift (3), +5 more file(s). The bar is 30 methods; this is 26 over it, 1.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: FastSymbolGraphJSONDecoder Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:104 — TooManyMethods — 40 methods, declared across 2 files: JSONDecoding/FastSymbolGraphJSONDecoder.swift (37), LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift (3). 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: MarkdownOutputSemanticVisitor Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:15 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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.
  • TooManyMethods: ReferenceResolver Sources/SwiftDocC/Semantics/ReferenceResolver.swift:88 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× 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.
  • TooManyMethods: ExternalReferenceWalker Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift:28 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× 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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×7
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:341 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:341-350 | Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:353-361 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:984 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:984-995 | Sources/SwiftDocC/Semantics/ReferenceResolver.swift:387-395 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift:70 — Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift:70-78 | Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift:85-97 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift:119 — Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift:119-127 | Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialSectionsRenderSection.swift:106-115 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/DocCCommon/SourceLanguage.swift:203 — Sources/DocCCommon/SourceLanguage.swift:203-211 | Sources/DocCCommon/SourceLanguage.swift:216-225 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift:1392 — Sources/SwiftDocC/Indexing/Navigator/NavigatorIndex.swift:1392-1400 | Sources/DocCCommandLine/Action/Actions/Convert/Indexer.swift:107-115 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/SwiftDocC/Infrastructure/Workspace/DefaultAvailability.swift:171 — Sources/SwiftDocC/Infrastructure/Workspace/DefaultAvailability.swift:171-179 | Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchy.swift:40-48 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:934 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:934-943 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:548-556 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:934` 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/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:82 — Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:82-90 | Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:172-180 — 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 (9 lines × 2) Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:161 — Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:161-169 | Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:180-188 — 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/SwiftDocC/Model/Rendering/Diffing/Differences.swift:161` 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 (9 lines × 2) Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:140 — Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:140-148 | Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:200-208 — 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/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:140` 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 (9 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/AttributesSectionTranslator.swift:27 — Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/AttributesSectionTranslator.swift:27-35 | Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:87-101 — 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/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:87` 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 (9 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:766 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:766-774 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:907-915 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:903` calls `decode`, `contains` and `Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:764` 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 (9 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:782 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:782-790 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:922-930 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×7
  • Duplicated block (8 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:121 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:121-128 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:891-898 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:121` 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 (8 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:169 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:169-177 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:552-559 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:169` 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 (8 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:673 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:673-681 | Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+FastJSONDecodable.swift:108-115 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:673` 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 (8 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:258 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:258-265 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:806-813 — 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/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:258` 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 (8 lines × 2) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:174 — Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:174-181 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:195-202 — 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/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:174` 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 (8 lines × 2) Sources/SwiftDocC/Semantics/Media/ImageMedia.swift:76 — Sources/SwiftDocC/Semantics/Media/ImageMedia.swift:76-83 | Sources/SwiftDocC/Semantics/Media/VideoMedia.swift:86-93 — 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/SwiftDocC/Semantics/Media/ImageMedia.swift:76` 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 (8 lines × 2) Sources/SwiftDocC/Semantics/Comment.swift:36 — Sources/SwiftDocC/Semantics/Comment.swift:36-43 | Sources/SwiftDocC/Semantics/Technology/Resources/Tile.swift:169-176 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:105 — Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:105-110 | Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:118-123 — 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 (6 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1452 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1452-1457 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:512-517 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1452` 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 (6 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2779 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2779-2784 | Sources/SwiftDocC/Infrastructure/Input Discovery/DocumentationInputsProvider.swift:406-411 — 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.
  • Duplicated block (6 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:38 — Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:38-43 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:257-262 — 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.
  • Duplicated block (6 lines × 2) Sources/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:119 — Sources/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:119-124 | Sources/SwiftDocC/Semantics/ReferenceResolver.swift:32-37 — 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/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:119` 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 (6 lines × 2) Sources/SwiftDocC/Infrastructure/Link Resolution/ExternalPathHierarchyResolver.swift:72 — Sources/SwiftDocC/Infrastructure/Link Resolution/ExternalPathHierarchyResolver.swift:72-77 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchyBasedLinkResolver.swift:29-34 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) Sources/DocCCommandLine/PreviewServer/RequestHandler/DefaultRequestHandler.swift:62 — Sources/DocCCommandLine/PreviewServer/RequestHandler/DefaultRequestHandler.swift:62-66 | Sources/DocCCommandLine/PreviewServer/RequestHandler/SSERequestHandler.swift:25-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 `Sources/DocCCommandLine/PreviewServer/RequestHandler/SSERequestHandler.swift:25` 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 × 2) Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:84 — Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:84-88 | Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:120-124 — 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 `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 (5 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:877 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:877-881 | Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:884-888 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:881` calls `insertLandmarks` and `Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:874` 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 (5 lines × 2) Sources/SwiftDocC/Infrastructure/External Data/ExternalMetadata.swift:19 — Sources/SwiftDocC/Infrastructure/External Data/ExternalMetadata.swift:19-23 | Sources/SwiftDocC/Model/Rendering/SemanticVersion.swift:71-77 — 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. 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 (5 lines × 2) Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift:150 — Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift:150-155 | Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:193-197 — 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/SwiftDocC/Semantics/Tutorial/Tutorial.swift:150` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:191` calls `documentURL` and `Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift:148` 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 (5 lines × 2) Sources/SwiftDocC/Semantics/Snippets/Snippet.swift:59 — Sources/SwiftDocC/Semantics/Snippets/Snippet.swift:59-63 | Sources/SwiftDocC/Semantics/Symbol/DeprecationSummary.swift:60-64 — 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.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×5
  • Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Infrastructure/External Data/ExternalMetadata.swift:18 — Sources/SwiftDocC/Infrastructure/External Data/ExternalMetadata.swift:18-23 | Sources/SwiftDocC/Model/Rendering/SemanticVersion.swift:70-77 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:34 — Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:34-39 | Sources/SwiftDocC/Model/Rendering/Symbol/RelationshipsRenderSection.swift:37-44 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/DocCHTML/HTMLFormatter.swift:359 — Sources/DocCHTML/HTMLFormatter.swift:359-364 | Sources/DocCHTML/HTMLFormatter.swift:374-379 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Semantics/HTTPParameter.swift:36 — Sources/SwiftDocC/Model/Semantics/HTTPParameter.swift:36-42 | Sources/SwiftDocC/Model/Semantics/DictionaryKey.swift:31-36 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderTutorialsHierarchy.swift:49 — Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderTutorialsHierarchy.swift:49-54 | Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchyChapter.swift:41-46 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) Sources/DocCHTML/MarkdownRenderer+Relationships.swift:61 — Sources/DocCHTML/MarkdownRenderer+Relationships.swift:61-67 | Sources/DocCHTML/MarkdownRenderer+Topics.swift:65-71 — 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 (7 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:58 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:58-64 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:185-191 — 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/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:58` 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/SwiftDocC/Model/Rendering/Symbol/ContentRenderSection.swift:42 — Sources/SwiftDocC/Model/Rendering/Symbol/ContentRenderSection.swift:42-48 | Sources/SwiftDocC/Model/Rendering/Tutorial Article/TutorialArticleSection.swift:96-102 — 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. 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/SwiftDocC/Model/Rendering/Symbol/ParameterRenderSection.swift:53 — Sources/SwiftDocC/Model/Rendering/Symbol/ParameterRenderSection.swift:53-59 | Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:88-94 — 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. 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/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift:37 — Sources/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift:37-43 | Sources/SwiftDocC/Model/Section/Sections/HTTPParametersSection.swift:29-35 — 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/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift:37` 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.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×4
  • Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:50 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:50-62 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:56-70 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:32 — Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:32-48 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:256-268 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/DocumentationNode.swift:171 — Sources/SwiftDocC/Model/DocumentationNode.swift:171-183 | Sources/SwiftDocC/Model/DocumentationNode.swift:185-199 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) Sources/SwiftDocC/Model/DocumentationMarkup.swift:312 — Sources/SwiftDocC/Model/DocumentationMarkup.swift:312-324 | Sources/SwiftDocC/Model/DocumentationMarkup.swift:329-341 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×4
  • Edited copy of a member (11 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/TaskGroupRenderSection.swift:108 — Sources/SwiftDocC/Model/Rendering/Symbol/TaskGroupRenderSection.swift:108-118 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/CallToActionSection.swift:62-73 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/DocCTestUtilities/TestFileSystem.swift:337 — Sources/DocCTestUtilities/TestFileSystem.swift:337-347 | Sources/SwiftDocC/Utility/FileManagerProtocol.swift:183-193 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/SwiftDocC/Model/Section/Section.swift:31 — Sources/SwiftDocC/Model/Section/Section.swift:31-45 | Sources/SwiftDocC/Model/Section/Section.swift:55-65 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/DocCTestUtilities/TestFileSystem.swift:210 — Sources/DocCTestUtilities/TestFileSystem.swift:210-224 | Sources/DocCTestUtilities/TestFileSystem.swift:263-273 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×4
  • Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift:68 — Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift:68-75 | Sources/SwiftDocC/Semantics/TutorialArticle/Stack.swift:46-53 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/DeclarationsRenderSection.swift:287 — Sources/SwiftDocC/Model/Rendering/Symbol/DeclarationsRenderSection.swift:287-294 | Sources/SwiftDocC/Model/Rendering/Symbol/RESTEndpointRenderSection.swift:90-97 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Technology/TutorialTableOfContents.swift:47 — Sources/SwiftDocC/Semantics/Technology/TutorialTableOfContents.swift:47-54 | Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift:51-58 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift:44 — Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/Choice/Choice.swift:44-51 | Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/MultipleChoice.swift:37-44 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×4
  • Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:114 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:114-119 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:117-121 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:121 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:121-126 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:123-127 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/DocCCommon/SourceLanguage.swift:41 — Sources/DocCCommon/SourceLanguage.swift:41-46 | Sources/SwiftDocC/Semantics/Symbol/PlatformName.swift:38-42 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/DiffAvailability.swift:56 — Sources/SwiftDocC/Model/Rendering/Symbol/DiffAvailability.swift:56-60 | Sources/SwiftDocC/Model/Rendering/Symbol/RelationshipsRenderSection.swift:31-35 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) Sources/DocCHTML/MarkdownRenderer.swift:924 — Sources/DocCHTML/MarkdownRenderer.swift:924-938 | Sources/SwiftDocC/Model/Identifier.swift:652-666 — 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.
  • Duplicated block (15 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPBodySectionTranslator.swift:35 — Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPBodySectionTranslator.swift:35-49 | Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPResponsesSectionTranslator.swift:46-60 — 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/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPBodySectionTranslator.swift:35` 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 lines × 2) Sources/SwiftDocC/Utility/Synchronization.swift:81 — Sources/SwiftDocC/Utility/Synchronization.swift:81-95 | Sources/SwiftDocC/Utility/Synchronization.swift:120-134 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (15 lines × 2) Sources/generate-symbol-graph/main.swift:148 — Sources/generate-symbol-graph/main.swift:148-162 | Sources/generate-symbol-graph/main.swift:171-188 — 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/generate-symbol-graph/main.swift:148` 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×4
  • Duplicated block (13 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:595 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:595-607 | Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:667-679 — 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/SwiftDocC/Infrastructure/DocumentationContext.swift:595` 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/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:129 — Sources/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:129-141 | Sources/SwiftDocC/Semantics/ReferenceResolver.swift:42-54 — 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/SwiftDocC/Infrastructure/Link Resolution/SnippetResolver.swift:129` 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/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift:133 — Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift:133-145 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Error.swift:154-166 — 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 (13 lines × 2) Sources/SwiftDocC/Model/Rendering/References/FileReference.swift:82 — Sources/SwiftDocC/Model/Rendering/References/FileReference.swift:82-94 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/ContentAndMediaSection.swift:74-86 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:51 — Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:51-60 | Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:64-73 — 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 (10 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:247 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:247-256 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:273-282 — 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/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:247` 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 (10 lines × 2) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:67 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:67-76 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:75-84 — 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/SwiftDocC/Model/Rendering/References/ImageReference.swift:67` 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 (10 lines × 2) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:50 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:50-59 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:56-65 — 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/SwiftDocC/Model/Rendering/References/ImageReference.swift:50` 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.
D12 · Dependency Hygiene · Floating branch dependency · ×3
  • Floating branch dependency: swift-markdown — Dependency `swift-markdown` is declared in Package.swift against branch `main` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
  • Floating branch dependency: swift-lmdb — Dependency `swift-lmdb` is declared in Package.swift against branch `main` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
  • Floating branch dependency: swift-docc-symbolkit — Dependency `swift-docc-symbolkit` is declared in Package.swift against branch `main` — the declaration pins no immutable point, so `swift package update` moves this dependency to whatever that branch holds at the time, which is code nobody reviewed. Pin it to a version requirement (`from:`, `.upToNextMajor(from:)`, `exact:`) or to a `revision:` commit SHA.
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: DocumentationContext Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:37 — ClassTooLong — 1608 significant lines (blank, comment-only and punctuation-only lines excluded), 78 methods. The bar is 400 significant lines; this is 1208 over it, 4.02× 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: RenderNodeTranslator Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:21 — ClassTooLong — 1180 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 780 over it, 2.95× 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: DocumentationNode Sources/SwiftDocC/Model/DocumentationNode.swift:20 — ClassTooLong — 656 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 256 over it, 1.64× 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.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×3
  • Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:321 — Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:321-346 | Sources/SwiftDocC/Model/Rendering/RenderNode/RenderMetadata.swift:352-381 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:539 — Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:539-564 | Sources/SwiftDocC/Model/Section/Sections/PropertyListPossibleValuesSection.swift:62-90 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) Sources/SwiftDocC/Model/TaskGroup.swift:28 — Sources/SwiftDocC/Model/TaskGroup.swift:28-56 | Sources/SwiftDocC/Model/TaskGroup.swift:58-83 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×3
  • Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:351 — Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:351-365 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:421-436 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:505 — Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:505-519 | Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:582-597 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/SwiftDocC/Converter/DocumentationContextConverter.swift:57 — Sources/SwiftDocC/Converter/DocumentationContextConverter.swift:57-71 | Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:2042-2059 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×3
  • Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:979 — Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:979-992 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:994-1007 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:156 — Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:156-169 | Sources/SwiftDocC/Model/Rendering/Diffing/Differences.swift:172-188 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:100 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:100-113 | Sources/SwiftDocC/Model/Rendering/Tutorial/LineHighlighter.swift:86-101 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:461 — Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:461-472 | Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:474-483 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift:87 — Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift:87-98 | Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:94-103 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:657 — Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:657-666 | Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:684-693 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 9+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:118 — Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:118-135 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:192-211 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:325-333 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/ChildDirectiveWrapper.swift:83 — Sources/SwiftDocC/Semantics/DirectiveInfrastructure/ChildDirectiveWrapper.swift:83-91 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/ChildMarkdownWrapper.swift:86-94 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:158-166 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) Sources/DocCHTML/HTMLNode+Tags.swift:203 — Sources/DocCHTML/HTMLNode+Tags.swift:203-211 | Sources/DocCHTML/HTMLNode+Tags.swift:987-995 | Sources/DocCHTML/HTMLNode+Tags.swift:1246-1254 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:77 — Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:77-83 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:85-88 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Infrastructure/Communication/Code colors/CodeColorsPreferenceKey.swift:78 — Sources/SwiftDocC/Infrastructure/Communication/Code colors/CodeColorsPreferenceKey.swift:78-81 | Sources/SwiftDocC/Model/Rendering/Content/RenderBlockContent.swift:669-672 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:315 — Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:315-318 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift:591-594 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:804 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:804-815 | Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1389-1400 — 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) Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:50 — Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:50-61 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasExactlyOne.swift:56-67 — 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/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:50` 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/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:46 — Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:46-57 | Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:125-136 — 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/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:46` 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.
D2 · Cognitive Complexity · PathHierarchy.findNode · ×2
  • PathHierarchy.findNode::searchForNodeInModules (cognitive 17) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:90 — PathHierarchy.findNode::searchForNodeInModules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 1 (3 pts), boolean chains 2, error handling 1 (2 pts), ternaries 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. This shape REPEATS in the file: 2 other methods here (PathHierarchy.findNode, PathHierarchy.findNode::searchForNodeUpTheHierarchy) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • PathHierarchy.findNode::searchForNodeUpTheHierarchy (cognitive 16) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:143 — PathHierarchy.findNode::searchForNodeUpTheHierarchy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (7 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. This shape REPEATS in the file: 2 other methods here (PathHierarchy.findNode, PathHierarchy.findNode::searchForNodeInModules) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: main.swift.top-level code Sources/generate-symbol-graph/main.swift:88 — FunctionTooLong — top-level code runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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: main.swift.extractDocumentationCommentsForDirectives Sources/generate-symbol-graph/main.swift:247 — FunctionTooLong — extractDocumentationCommentsForDirectives runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× 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.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: SymbolGraphLoader.swift ↔ DefaultAvailability.swift Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift:1 — `Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift` and `Sources/SwiftDocC/Infrastructure/Workspace/DefaultAvailability.swift` change together 55% of the time (6 of the 11 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `2ac04ba7` Integrate the new availability implementation (#1686); `2b5bdf19` Revert "Fix availability logic refactor (#1065)" (#1158); `1ad9b6af` Fix availability logic refactor (#1065) — run `git show` on any of them.
  • Change coupling: RenderContentCompiler.swift ↔ MarkupReferenceResolver.swift Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:1 — `Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift` and `Sources/SwiftDocC/Semantics/MarkupReferenceResolver.swift` change together 50% of the time (12 of the 24 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `6ed76cce` Added support for rendering thematic breaks with unit tests (#865); `bad0aaaf` Add support for transforming Doxygen discussion/note tags (#798); `186fb132` Fix rendering issue for links with special characters (#532) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1250 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1250-1292 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1362-1396 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:665 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:665-707 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:506-538 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) Sources/SwiftDocC/Semantics/ContentAndMedia.swift:87 — Sources/SwiftDocC/Semantics/ContentAndMedia.swift:87-108 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Code.swift:71-99 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) Sources/DocCHTML/MarkdownRenderer+Relationships.swift:33 — Sources/DocCHTML/MarkdownRenderer+Relationships.swift:33-54 | Sources/DocCHTML/MarkdownRenderer+Topics.swift:37-58 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderReference.swift:26 — Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderReference.swift:26-57 | Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderReference.swift:59-90 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:717 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:717-757 | Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+FastJSONDecodable.swift:102-133 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×2
  • Edited copy of a member (42 corresponding lines) Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:43 — Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:43-84 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasExactlyOne.swift:49-106 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (42 corresponding lines) Sources/SwiftDocC/Model/DocumentationNode.swift:686 — Sources/SwiftDocC/Model/DocumentationNode.swift:686-727 | Sources/SwiftDocC/Model/DocumentationNode.swift:732-776 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) Sources/SwiftDocC/Utility/Synchronization.swift:79 — Sources/SwiftDocC/Utility/Synchronization.swift:79-98 | Sources/SwiftDocC/Utility/Synchronization.swift:118-136 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DictionaryKeysSectionTranslator.swift:15 — Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DictionaryKeysSectionTranslator.swift:15-33 | Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/HTTPParametersSectionTranslator.swift:17-35 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) Sources/DocCHTML/MarkdownRenderer+Relationships.swift:56 — Sources/DocCHTML/MarkdownRenderer+Relationships.swift:56-72 | Sources/DocCHTML/MarkdownRenderer+Topics.swift:60-86 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:137 — Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:137-156 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:346-362 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×2
  • Edited copy of a member (21 corresponding lines) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:392 — Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:392-413 | Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:419-439 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift:83 — Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift:83-105 | Sources/SwiftDocC/Indexing/Navigator/NavigatorItem.swift:121-141 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift:138 — Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift:138-147 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/VolumeRenderSection.swift:84-94 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/VolumeRenderSection.swift:105-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:98 — Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:98-116 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:170-190 | Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveArgumentWrapper.swift:335-344 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Serialization.swift:123 — Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Serialization.swift:123-130 | Sources/SwiftDocC/Model/Rendering/SemanticVersion.swift:45-52 | Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift:76-83 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/SwiftDocC/Model/Identifier.swift:519 — Sources/SwiftDocC/Model/Identifier.swift:519-529 | Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:146-154 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:150-157 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 5+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:36 — Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:36-40 | Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:51-55 | Sources/SwiftDocC/Model/Rendering/Symbol/PropertiesRenderSection.swift:39-43 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 5+ corresponding lines) Sources/SwiftDocC/Infrastructure/DocumentationContext+Inputs+Identifier.swift:57 — Sources/SwiftDocC/Infrastructure/DocumentationContext+Inputs+Identifier.swift:57-61 | Sources/SwiftDocC/Model/Rendering/Variants/JSONPointer.swift:87-91 | Sources/SwiftDocC/Semantics/Symbol/PlatformName.swift:49-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×2
  • Edited copy of a member (3 corresponding lines) Sources/SwiftDocC/Indexing/Indexable.swift:55 — Sources/SwiftDocC/Indexing/Indexable.swift:55-57 | Sources/SwiftDocC/Indexing/RenderSection+TextIndexing.swift:71-73 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:97 — Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:97-99 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/VolumeRenderSection.swift:117-119 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) Sources/DocCHTML/MarkdownRenderer.swift:581 — Sources/DocCHTML/MarkdownRenderer.swift:581-602 | Sources/DocCHTML/MarkdownRenderer.swift:615-636 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (22 lines × 2) Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:315 — Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:315-336 | Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:363-384 — 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/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:315` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×2
  • Duplicated block (16–17 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:190 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:190-205 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:739-755 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:634-649 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.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. 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 (16–17 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:687 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:687-702 | Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+FastJSONDecodable.swift:115-131 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:206-221 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:687` 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. 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.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:328 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:328-344 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:105-121 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:328` 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 (17 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:897 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:897-913 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1376-1392 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:897` 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.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:327 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:327-342 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:735-750 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:104-119 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:327` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:344` calls `makeKeyNotFoundError` and `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:752` 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 (16 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:896 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:896-911 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1267-1282 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1375-1390 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:896` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1284` calls `makeKeyNotFoundError` and `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1392` 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:224 — Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:224-239 | Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:964-979 — 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 (16 lines × 2) Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:197 — Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:197-212 | Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:224-239 — 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/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:197` 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2798 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2798-2811 | Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2826-2839 — 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/SwiftDocC/Infrastructure/DocumentationContext.swift:2798` 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/SwiftDocC/Semantics/Media/ImageMedia.swift:50 — Sources/SwiftDocC/Semantics/Media/ImageMedia.swift:50-63 | Sources/SwiftDocC/Semantics/Media/VideoMedia.swift:60-73 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1256 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1256-1266 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1367-1377 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1256` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1267` calls `matchKey`, `decode` and `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1379` 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 (11 lines × 2) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:406 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:406-416 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:520-530 — 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/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:406` 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1478 — Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1478-1482 | Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1485-1489 | Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1495-1499 — 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 (5 lines × 3) Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:322 — Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.swift:322-326 | Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:46-50 | Sources/SwiftDocC/Model/Rendering/Tutorial/References/XcodeRequirementReference.swift:42-46 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/SwiftDocC/Model/Rendering/Tutorial/References/XcodeRequirementReference.swift:47` calls `addDifferences` and `Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:52` 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.
D1 · Cyclomatic Complexity · PathHierarchy.init (cyclomatic 72) · ×1
  • PathHierarchy.init (cyclomatic 72) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:64 — PathHierarchy.init has cyclomatic complexity 72 (threshold 15). Of this number, 67 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cyclomatic 66) · ×1
  • FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cyclomatic 66) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:726 — FastSymbolGraphJSONDecoder.decodeAnyRenderReference has cyclomatic complexity 66 (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.
D1 · Cyclomatic Complexity · RenderNodeTranslator.visitSymbol (cyclomatic 57) · ×1
  • RenderNodeTranslator.visitSymbol (cyclomatic 57) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304 — RenderNodeTranslator.visitSymbol has cyclomatic complexity 57 (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.
D1 · Cyclomatic Complexity · DocumentationMarkup.init (cyclomatic 49) · ×1
  • DocumentationMarkup.init (cyclomatic 49) Sources/SwiftDocC/Model/DocumentationMarkup.swift:110 — DocumentationMarkup.init has cyclomatic complexity 49 (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.
D1 · Cyclomatic Complexity · PathHierarchy.findNode (cyclomatic 48) · ×1
  • PathHierarchy.findNode (cyclomatic 48) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:27 — PathHierarchy.findNode has cyclomatic complexity 48 (threshold 15). Of this number, 28 points are the body's own statements and 20 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.
D1 · Cyclomatic Complexity · Symbol.init (cyclomatic 41) · ×1
  • Symbol.init (cyclomatic 41) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:403 — Symbol.init has cyclomatic complexity 41 (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.
D1 · Cyclomatic Complexity · RenderInlineContent.init (cyclomatic 39) · ×1
  • RenderInlineContent.init (cyclomatic 39) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:363 — RenderInlineContent.init has cyclomatic complexity 39 (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.
D1 · Cyclomatic Complexity · LinkDestinationSummary.== (cyclomatic 38) · ×1
  • LinkDestinationSummary.== (cyclomatic 38) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:968 — LinkDestinationSummary.== has cyclomatic complexity 38 (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.
D1 · Cyclomatic Complexity · RenderNodeTranslator.visitArticle (cyclomatic 38) · ×1
  • RenderNodeTranslator.visitArticle (cyclomatic 38) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:630 — RenderNodeTranslator.visitArticle has cyclomatic complexity 38 (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.
D1 · Cyclomatic Complexity · PathHierarchy.utf8TypeSpelling (cyclomatic 37) · ×1
  • PathHierarchy.utf8TypeSpelling (cyclomatic 37) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift:92 — PathHierarchy.utf8TypeSpelling has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · MarkdownRenderer.visit (cyclomatic 36) · ×1
  • MarkdownRenderer.visit (cyclomatic 36) Sources/DocCHTML/MarkdownRenderer.swift:827 — MarkdownRenderer.visit has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · DocumentationContext.registerSymbols (cyclomatic 36) · ×1
  • DocumentationContext.registerSymbols (cyclomatic 36) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040 — DocumentationContext.registerSymbols has cyclomatic complexity 36 (threshold 15). Of this number, 35 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.
D1 · Cyclomatic Complexity · main.swift.extractDocumentationCommentsForDirectives (cyclomatic 36) · ×1
  • main.swift.extractDocumentationCommentsForDirectives (cyclomatic 36) Sources/generate-symbol-graph/main.swift:247 — main.swift.extractDocumentationCommentsForDirectives has cyclomatic complexity 36 (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.
D1 · Cyclomatic Complexity · DocumentationCurator.crawlChildren (cyclomatic 34) · ×1
  • DocumentationCurator.crawlChildren (cyclomatic 34) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:158 — DocumentationCurator.crawlChildren has cyclomatic complexity 34 (threshold 15). Of this number, 28 points are the body's own statements and 6 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.
D1 · Cyclomatic Complexity · AutomaticDirectiveConvertible.init (cyclomatic 34) · ×1
  • AutomaticDirectiveConvertible.init (cyclomatic 34) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/AutomaticDirectiveConvertible.swift:116 — AutomaticDirectiveConvertible.init has cyclomatic complexity 34 (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.
D1 · Cyclomatic Complexity · ConvertActionConverter.convert (cyclomatic 32) · ×1
  • ConvertActionConverter.convert (cyclomatic 32) Sources/SwiftDocC/Infrastructure/ConvertActionConverter.swift:36 — ConvertActionConverter.convert has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol (cyclomatic 32) · ×1
  • DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol (cyclomatic 32) Sources/SwiftDocC/Model/DocumentationNode.swift:934 — DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 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. This is NOT this file's highest cyclomatic complexity: DocumentationNode.kind (cyclomatic 38) 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.
D1 · Cyclomatic Complexity · HTMLRenderer.renderSymbol (cyclomatic 32) · ×1
  • HTMLRenderer.renderSymbol (cyclomatic 32) Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:246 — HTMLRenderer.renderSymbol has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · ConvertAction._perform (cyclomatic 31) · ×1
  • ConvertAction._perform (cyclomatic 31) Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:246 — ConvertAction._perform has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · DocumentationContext.populateOnPageMemberRelationships (cyclomatic 31) · ×1
  • DocumentationContext.populateOnPageMemberRelationships (cyclomatic 31) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1458 — DocumentationContext.populateOnPageMemberRelationships has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · _Tag.canOmitEndTag (cyclomatic 30) · ×1
  • _Tag.canOmitEndTag (cyclomatic 30) Sources/DocCHTML/HTMLFormatter.swift:484 — _Tag.canOmitEndTag has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · SemanticAnalyzer.visitBlockDirective (cyclomatic 30) · ×1
  • SemanticAnalyzer.visitBlockDirective (cyclomatic 30) Sources/SwiftDocC/Semantics/SemanticAnalyzer.swift:104 — SemanticAnalyzer.visitBlockDirective has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · LinkDestinationSummary.init (cyclomatic 27) · ×1
  • LinkDestinationSummary.init (cyclomatic 27) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:16 — LinkDestinationSummary.init has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · UnsafeRawPointer.hasASCIIPrefix (cyclomatic 26) · ×1
  • UnsafeRawPointer.hasASCIIPrefix (cyclomatic 26) Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:18 — UnsafeRawPointer.hasASCIIPrefix has cyclomatic complexity 26 (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.
D1 · Cyclomatic Complexity · TaggedListItemExtractor.visitListItem (cyclomatic 25) · ×1
  • TaggedListItemExtractor.visitListItem (cyclomatic 25) Sources/SwiftDocC/Utility/MarkupExtensions/ListItemExtractor.swift:112 — TaggedListItemExtractor.visitListItem has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · main.swift.declarationFragments (cyclomatic 25) · ×1
  • main.swift.declarationFragments (cyclomatic 25) Sources/generate-symbol-graph/main.swift:477 — main.swift.declarationFragments 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.
D1 · Cyclomatic Complexity · HTMLFormatter._prettyFormat (cyclomatic 24) · ×1
  • HTMLFormatter._prettyFormat (cyclomatic 24) Sources/DocCHTML/HTMLFormatter.swift:180 — HTMLFormatter._prettyFormat has cyclomatic complexity 24 (threshold 15). Of this number, 21 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.
D1 · Cyclomatic Complexity · DocumentationNode.initializeSymbolContent (cyclomatic 24) · ×1
  • DocumentationNode.initializeSymbolContent (cyclomatic 24) Sources/SwiftDocC/Model/DocumentationNode.swift:369 — DocumentationNode.initializeSymbolContent has cyclomatic complexity 24 (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. This is NOT this file's highest cyclomatic complexity: DocumentationNode.kind (cyclomatic 38) 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.
D1 · Cyclomatic Complexity · DocumentationContext.resolveLinks (cyclomatic 23) · ×1
  • DocumentationContext.resolveLinks (cyclomatic 23) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:409 — DocumentationContext.resolveLinks has cyclomatic complexity 23 (threshold 15). Of this number, 19 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.
D1 · Cyclomatic Complexity · ParametersAndReturnValidator.makeParametersSectionVariants (cyclomatic 23) · ×1
  • ParametersAndReturnValidator.makeParametersSectionVariants (cyclomatic 23) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:115 — ParametersAndReturnValidator.makeParametersSectionVariants 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.
D1 · Cyclomatic Complexity · RenderNodeTranslator.createRenderProperty (cyclomatic 23) · ×1
  • RenderNodeTranslator.createRenderProperty (cyclomatic 23) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1956 — RenderNodeTranslator.createRenderProperty 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.
D1 · Cyclomatic Complexity · Metadata.validate (cyclomatic 23) · ×1
  • Metadata.validate (cyclomatic 23) Sources/SwiftDocC/Semantics/Metadata/Metadata.swift:106 — Metadata.validate has cyclomatic complexity 23 (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.
D1 · Cyclomatic Complexity · DocumentationContext.register (cyclomatic 22) · ×1
  • DocumentationContext.register (cyclomatic 22) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2073 — DocumentationContext.register 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.
D1 · Cyclomatic Complexity · DocumentationContentRenderer.renderReference (cyclomatic 22) · ×1
  • DocumentationContentRenderer.renderReference (cyclomatic 22) Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:265 — DocumentationContentRenderer.renderReference has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · DocumentationContext.registerDocuments (cyclomatic 21) · ×1
  • DocumentationContext.registerDocuments (cyclomatic 21) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:720 — DocumentationContext.registerDocuments 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.
D1 · Cyclomatic Complexity · MarkdownOutputMarkupWalker.visitBlockDirective (cyclomatic 21) · ×1
  • MarkdownOutputMarkupWalker.visitBlockDirective (cyclomatic 21) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:353 — MarkdownOutputMarkupWalker.visitBlockDirective has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · ContiguousArray.applySwiftSyntacticSugar (cyclomatic 21) · ×1
  • ContiguousArray.applySwiftSyntacticSugar (cyclomatic 21) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift:368 — ContiguousArray.applySwiftSyntacticSugar has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · ExternalReferenceWalker.visitSymbol (cyclomatic 20) · ×1
  • ExternalReferenceWalker.visitSymbol (cyclomatic 20) Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift:225 — ExternalReferenceWalker.visitSymbol has cyclomatic complexity 20 (threshold 15). 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.
D1 · Cyclomatic Complexity · Symbol.init (cyclomatic 20) · ×1
  • Symbol.init (cyclomatic 20) Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:286 — Symbol.init 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.
D1 · Cyclomatic Complexity · DisambiguationContainer.find (cyclomatic 20) · ×1
  • DisambiguationContainer.find (cyclomatic 20) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:502 — DisambiguationContainer.find 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.
D1 · Cyclomatic Complexity · MarkdownRenderer.visit (cyclomatic 19) · ×1
  • MarkdownRenderer.visit (cyclomatic 19) Sources/DocCHTML/MarkdownRenderer.swift:572 — MarkdownRenderer.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.
D1 · Cyclomatic Complexity · Availability.finalizePlatformFallbacks (cyclomatic 19) · ×1
  • Availability.finalizePlatformFallbacks (cyclomatic 19) Sources/SwiftDocC/Model/Availability.swift:241 — Availability.finalizePlatformFallbacks has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · RenderContentCompiler.visitLink (cyclomatic 19) · ×1
  • RenderContentCompiler.visitLink (cyclomatic 19) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:145 — RenderContentCompiler.visitLink 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.
D1 · Cyclomatic Complexity · Article.init (cyclomatic 19) · ×1
  • Article.init (cyclomatic 19) Sources/SwiftDocC/Semantics/Article/Article.swift:132 — Article.init has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · Availability.addInSourceAvailability (cyclomatic 18) · ×1
  • Availability.addInSourceAvailability (cyclomatic 18) Sources/SwiftDocC/Model/Availability.swift:140 — Availability.addInSourceAvailability has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource (cyclomatic 18) · ×1
  • DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource (cyclomatic 18) Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift:312 — DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource 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.
D1 · Cyclomatic Complexity · RenderNodeTranslator.renderGroups (cyclomatic 18) · ×1
  • RenderNodeTranslator.renderGroups (cyclomatic 18) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1135 — RenderNodeTranslator.renderGroups has cyclomatic complexity 18 (threshold 15). 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, 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.
D1 · Cyclomatic Complexity · DirectiveMirror.init (cyclomatic 18) · ×1
  • DirectiveMirror.init (cyclomatic 18) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveMirror.swift:17 — DirectiveMirror.init 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.
D1 · Cyclomatic Complexity · RenderInlineContent.rawIndexableTextContent (cyclomatic 18) · ×1
  • RenderInlineContent.rawIndexableTextContent (cyclomatic 18) Sources/SwiftDocC/Indexing/RenderInlineContent+TextIndexing.swift:16 — RenderInlineContent.rawIndexableTextContent 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.
D1 · Cyclomatic Complexity · DeclarationsSectionTranslator.translateSection (cyclomatic 18) · ×1
  • DeclarationsSectionTranslator.translateSection (cyclomatic 18) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:71 — DeclarationsSectionTranslator.translateSection has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · MultipleChoice.init (cyclomatic 18) · ×1
  • MultipleChoice.init (cyclomatic 18) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/MultipleChoice.swift:63 — MultipleChoice.init 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.
D1 · Cyclomatic Complexity · DocumentationCurator.referenceFromLink (cyclomatic 17) · ×1
  • DocumentationCurator.referenceFromLink (cyclomatic 17) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:51 — DocumentationCurator.referenceFromLink 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.
D1 · Cyclomatic Complexity · ExtractLinks.visitUnorderedList (cyclomatic 17) · ×1
  • ExtractLinks.visitUnorderedList (cyclomatic 17) Sources/SwiftDocC/Model/TaskGroup.swift:85 — ExtractLinks.visitUnorderedList 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.
D1 · Cyclomatic Complexity · PathHierarchy.disambiguatedPaths (cyclomatic 17) · ×1
  • PathHierarchy.disambiguatedPaths (cyclomatic 17) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift:93 — PathHierarchy.disambiguatedPaths has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (descend). 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.
D1 · Cyclomatic Complexity · PathHierarchy.searchForNode · ×1
  • PathHierarchy.searchForNode::_innerImplementation (cyclomatic 17) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:230 — PathHierarchy.searchForNode::_innerImplementation 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.
D1 · Cyclomatic Complexity · JSONPatchApplier.apply (cyclomatic 17) · ×1
  • JSONPatchApplier.apply (cyclomatic 17) Sources/SwiftDocC/Model/Rendering/Variants/JSONPatchApplier.swift:140 — JSONPatchApplier.apply 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.
D1 · Cyclomatic Complexity · PreviewHTTPHandler.channelRead (cyclomatic 16) · ×1
  • PreviewHTTPHandler.channelRead (cyclomatic 16) Sources/DocCCommandLine/PreviewServer/PreviewHTTPHandler.swift:72 — PreviewHTTPHandler.channelRead 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.
D1 · Cyclomatic Complexity · ConvertFileWritingConsumer.consume (cyclomatic 16) · ×1
  • ConvertFileWritingConsumer.consume (cyclomatic 16) Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:89 — ConvertFileWritingConsumer.consume 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, 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.
D1 · Cyclomatic Complexity · FastSymbolGraphJSONDecoder.decode (cyclomatic 16) · ×1
  • FastSymbolGraphJSONDecoder.decode (cyclomatic 16) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:305 — FastSymbolGraphJSONDecoder.decode has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · GeneratedCurationWriter.generateDefaultCurationContents (cyclomatic 16) · ×1
  • GeneratedCurationWriter.generateDefaultCurationContents (cyclomatic 16) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift:116 — GeneratedCurationWriter.generateDefaultCurationContents 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.
D1 · Cyclomatic Complexity · DocumentationContext.resolveExternalSymbols (cyclomatic 16) · ×1
  • DocumentationContext.resolveExternalSymbols (cyclomatic 16) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1574 — DocumentationContext.resolveExternalSymbols has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
D1 · Cyclomatic Complexity · DocumentationNode.contentFrom (cyclomatic 16) · ×1
  • DocumentationNode.contentFrom (cyclomatic 16) Sources/SwiftDocC/Model/DocumentationNode.swift:541 — DocumentationNode.contentFrom 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. This is NOT this file's highest cyclomatic complexity: DocumentationNode.kind (cyclomatic 38) 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.
D1 · Cyclomatic Complexity · MarkupReferenceResolver.visitBlockDirective (cyclomatic 16) · ×1
  • MarkupReferenceResolver.visitBlockDirective (cyclomatic 16) Sources/SwiftDocC/Semantics/MarkupReferenceResolver.swift:160 — MarkupReferenceResolver.visitBlockDirective 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.
D1 · Cyclomatic Complexity · InvalidCodeBlockOption.visitCodeBlock (cyclomatic 16) · ×1
  • InvalidCodeBlockOption.visitCodeBlock (cyclomatic 16) Sources/SwiftDocC/Checker/Checkers/InvalidCodeBlockOption.swift:33 — InvalidCodeBlockOption.visitCodeBlock has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (validateArrayIndices, matches). 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.
D1 · Cyclomatic Complexity · RenderContentCompiler.visitTable (cyclomatic 16) · ×1
  • RenderContentCompiler.visitTable (cyclomatic 16) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:307 — RenderContentCompiler.visitTable has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · Symbol.mergeDeclaration (cyclomatic 16) · ×1
  • Symbol.mergeDeclaration (cyclomatic 16) Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:491 — Symbol.mergeDeclaration has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 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.
D1 · Cyclomatic Complexity · MarkdownOutputSemanticVisitor.visitSymbol (cyclomatic 16) · ×1
  • MarkdownOutputSemanticVisitor.visitSymbol (cyclomatic 16) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:213 — MarkdownOutputSemanticVisitor.visitSymbol has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · DeclarationsSectionTranslator.swift.postProcessTokens (cyclomatic 16) · ×1
  • DeclarationsSectionTranslator.swift.postProcessTokens (cyclomatic 16) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:308 — DeclarationsSectionTranslator.swift.postProcessTokens has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
D2 · Cognitive Complexity · PathHierarchy.init (cognitive 173) · ×1
  • PathHierarchy.init (cognitive 173) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy.swift:64 — PathHierarchy.init has cognitive complexity 173 (threshold 15). Drivers by points: if/else 37 (102 pts), loops 21 (52 pts), boolean chains 15, match/switch 1 (4 pts) (nesting depth added 99). Of this number, 163 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.
D2 · Cognitive Complexity · DocumentationMarkup.init (cognitive 116) · ×1
  • DocumentationMarkup.init (cognitive 116) Sources/SwiftDocC/Model/DocumentationMarkup.swift:110 — DocumentationMarkup.init has cognitive complexity 116 (threshold 15). Drivers by points: if/else 36 (90 pts), match/switch 3 (14 pts), boolean chains 11, loops 1 (nesting depth added 65). 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.
D2 · Cognitive Complexity · DocumentationContext.registerSymbols (cognitive 86) · ×1
  • DocumentationContext.registerSymbols (cognitive 86) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1040 — DocumentationContext.registerSymbols has cognitive complexity 86 (threshold 15). Drivers by points: if/else 21 (55 pts), loops 12 (24 pts), boolean chains 3, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 48). Of this number, 83 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.
D2 · Cognitive Complexity · RenderNodeTranslator.visitSymbol (cognitive 85) · ×1
  • RenderNodeTranslator.visitSymbol (cognitive 85) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1304 — RenderNodeTranslator.visitSymbol has cognitive complexity 85 (threshold 15). Drivers by points: if/else 41 (61 pts), boolean chains 12, loops 5 (7 pts), match/switch 2 (5 pts) (nesting depth added 25). 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.
D2 · Cognitive Complexity · FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cognitive 80) · ×1
  • FastSymbolGraphJSONDecoder.decodeAnyRenderReference (cognitive 80) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:726 — FastSymbolGraphJSONDecoder.decodeAnyRenderReference has cognitive complexity 80 (threshold 15). Drivers by points: if/else 54 (72 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 20). 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.
D2 · Cognitive Complexity · main.swift.extractDocumentationCommentsForDirectives (cognitive 68) · ×1
  • main.swift.extractDocumentationCommentsForDirectives (cognitive 68) Sources/generate-symbol-graph/main.swift:247 — main.swift.extractDocumentationCommentsForDirectives has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (48 pts), boolean chains 10, loops 5 (9 pts), match/switch 1 (nesting depth added 25). 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.
D2 · Cognitive Complexity · DocumentationCurator.crawlChildren (cognitive 67) · ×1
  • DocumentationCurator.crawlChildren (cognitive 67) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:158 — DocumentationCurator.crawlChildren has cognitive complexity 67 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 9, ternaries 2 (8 pts), loops 5 (7 pts), match/switch 2 (4 pts) (nesting depth added 34). Of this number, 54 points are the body's own statements and 13 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.
D2 · Cognitive Complexity · DocumentationContext.populateOnPageMemberRelationships (cognitive 65) · ×1
  • DocumentationContext.populateOnPageMemberRelationships (cognitive 65) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1458 — DocumentationContext.populateOnPageMemberRelationships has cognitive complexity 65 (threshold 15). Drivers by points: if/else 22 (49 pts), loops 5, boolean chains 4, ternaries 1 (4 pts), match/switch 1 (3 pts) (nesting depth added 32). 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.
D2 · Cognitive Complexity · PathHierarchy.utf8TypeSpelling (cognitive 59) · ×1
  • PathHierarchy.utf8TypeSpelling (cognitive 59) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift:92 — PathHierarchy.utf8TypeSpelling has cognitive complexity 59 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 4 (14 pts), boolean chains 13, loops 5 (13 pts) (nesting depth added 27). 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.
D2 · Cognitive Complexity · AutomaticDirectiveConvertible.init (cognitive 57) · ×1
  • AutomaticDirectiveConvertible.init (cognitive 57) Sources/SwiftDocC/Semantics/DirectiveInfrastructure/AutomaticDirectiveConvertible.swift:116 — AutomaticDirectiveConvertible.init has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (43 pts), boolean chains 8, loops 2, match/switch 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 23). 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.
D2 · Cognitive Complexity · ConvertActionConverter.convert (cognitive 52) · ×1
  • ConvertActionConverter.convert (cognitive 52) Sources/SwiftDocC/Infrastructure/ConvertActionConverter.swift:36 — ConvertActionConverter.convert has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (35 pts), boolean chains 6, loops 3 (5 pts), match/switch 2 (3 pts), ternaries 1 (3 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.
D2 · Cognitive Complexity · LinkDestinationSummary.== (cognitive 49) · ×1
  • LinkDestinationSummary.== (cognitive 49) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:968 — LinkDestinationSummary.== has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28 (46 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 19). 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.
D2 · Cognitive Complexity · PathHierarchy.findNode (cognitive 47) · ×1
  • PathHierarchy.findNode (cognitive 47) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:27 — PathHierarchy.findNode has cognitive complexity 47 (threshold 15). Drivers by points: if/else 30 (57 pts), error handling 5 (9 pts), boolean chains 7, match/switch 2 (6 pts), ternaries 1 (nesting depth added 35). 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. This shape REPEATS in the file: 2 other methods here (PathHierarchy.findNode::searchForNodeInModules, PathHierarchy.findNode::searchForNodeUpTheHierarchy) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol (cognitive 45) · ×1
  • DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol (cognitive 45) Sources/SwiftDocC/Model/DocumentationNode.swift:934 — DocumentationNode.warnAboutDeprecationSummaryForAvailableSymbol has cognitive complexity 45 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 9, ternaries 4 (7 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 9). Of this number, 42 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · PathHierarchy.searchForNode · ×1
  • PathHierarchy.searchForNode::_innerImplementation (cognitive 45) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:230 — PathHierarchy.searchForNode::_innerImplementation has cognitive complexity 45 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 2 (5 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 27). 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.
D2 · Cognitive Complexity · RenderNodeTranslator.visitArticle (cognitive 45) · ×1
  • RenderNodeTranslator.visitArticle (cognitive 45) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:630 — RenderNodeTranslator.visitArticle has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 8, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · RenderNodeTranslator.createRenderProperty (cognitive 44) · ×1
  • RenderNodeTranslator.createRenderProperty (cognitive 44) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1956 — RenderNodeTranslator.createRenderProperty has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 5, loops 1 (3 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.
D2 · Cognitive Complexity · Symbol.init (cognitive 44) · ×1
  • Symbol.init (cognitive 44) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:403 — Symbol.init has cognitive complexity 44 (threshold 15). Drivers by points: if/else 39 (40 pts), loops 2 (4 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.
D2 · Cognitive Complexity · RenderInlineContent.init (cognitive 43) · ×1
  • RenderInlineContent.init (cognitive 43) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:363 — RenderInlineContent.init has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 2, loops 1, 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.
D2 · Cognitive Complexity · ConvertAction._perform (cognitive 42) · ×1
  • ConvertAction._perform (cognitive 42) Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:246 — ConvertAction._perform has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 5 (9 pts), boolean chains 7, loops 2 (4 pts), match/switch 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.
D2 · Cognitive Complexity · HTMLRenderer.renderSymbol (cognitive 42) · ×1
  • HTMLRenderer.renderSymbol (cognitive 42) Sources/SwiftDocC/Model/Rendering/HTML/HTMLRenderer.swift:246 — HTMLRenderer.renderSymbol has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 3 (6 pts), match/switch 3 (5 pts), ternaries 2 (3 pts), boolean chains 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.
D2 · Cognitive Complexity · ParametersAndReturnValidator.makeParametersSectionVariants (cognitive 41) · ×1
  • ParametersAndReturnValidator.makeParametersSectionVariants (cognitive 41) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:115 — ParametersAndReturnValidator.makeParametersSectionVariants has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 10 (17 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · DocumentationContext.registerDocuments (cognitive 39) · ×1
  • DocumentationContext.registerDocuments (cognitive 39) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:720 — DocumentationContext.registerDocuments has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (30 pts), ternaries 2 (6 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 16). Of this number, 38 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.
D2 · Cognitive Complexity · ContiguousArray.applySwiftSyntacticSugar (cognitive 39) · ×1
  • ContiguousArray.applySwiftSyntacticSugar (cognitive 39) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift:368 — ContiguousArray.applySwiftSyntacticSugar has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (11 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 19). 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.
D2 · Cognitive Complexity · ExternalReferenceWalker.visitSymbol (cognitive 38) · ×1
  • ExternalReferenceWalker.visitSymbol (cognitive 38) Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift:225 — ExternalReferenceWalker.visitSymbol has cognitive complexity 38 (threshold 15). Drivers by points: loops 14 (33 pts), if/else 5 (nesting depth added 19). 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.
D2 · Cognitive Complexity · main.swift.declarationFragments (cognitive 38) · ×1
  • main.swift.declarationFragments (cognitive 38) Sources/generate-symbol-graph/main.swift:477 — main.swift.declarationFragments has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, loops 3 (6 pts), ternaries 3 (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.
D2 · Cognitive Complexity · HTMLFormatter._prettyFormat (cognitive 37) · ×1
  • HTMLFormatter._prettyFormat (cognitive 37) Sources/DocCHTML/HTMLFormatter.swift:180 — HTMLFormatter._prettyFormat has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, match/switch 3 (5 pts), ternaries 1 (3 pts), loops 1 (2 pts) (nesting depth added 15). Of this number, 34 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.
D2 · Cognitive Complexity · MarkdownRenderer.visit (cognitive 36) · ×1
  • MarkdownRenderer.visit (cognitive 36) Sources/DocCHTML/MarkdownRenderer.swift:827 — MarkdownRenderer.visit has cognitive complexity 36 (threshold 15). Drivers by points: if/else 33, boolean chains 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.
D2 · Cognitive Complexity · DocumentationContext.resolveLinks (cognitive 35) · ×1
  • DocumentationContext.resolveLinks (cognitive 35) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:409 — DocumentationContext.resolveLinks has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 4 (11 pts), boolean chains 8 (nesting depth added 12). Of this number, 31 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.
D2 · Cognitive Complexity · DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource (cognitive 34) · ×1
  • DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource (cognitive 34) Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift:312 — DefaultDiagnosticConsoleFormatter.formattedDiagnosticSource has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 8 (16 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · RenderContentCompiler.visitLink (cognitive 34) · ×1
  • RenderContentCompiler.visitLink (cognitive 34) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:145 — RenderContentCompiler.visitLink has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 11 (15 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · DocumentationNode.contentFrom (cognitive 33) · ×1
  • DocumentationNode.contentFrom (cognitive 33) Sources/SwiftDocC/Model/DocumentationNode.swift:541 — DocumentationNode.contentFrom has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 4, loops 1 (3 pts) (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.
D2 · Cognitive Complexity · MarkdownOutputMarkupWalker.visitBlockDirective (cognitive 33) · ×1
  • MarkdownOutputMarkupWalker.visitBlockDirective (cognitive 33) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:353 — MarkdownOutputMarkupWalker.visitBlockDirective has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 15). 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.
D2 · Cognitive Complexity · Availability.addInSourceAvailability (cognitive 32) · ×1
  • Availability.addInSourceAvailability (cognitive 32) Sources/SwiftDocC/Model/Availability.swift:140 — Availability.addInSourceAvailability has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 14). Of this number, 29 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.
D2 · Cognitive Complexity · DocumentationContext.analyzeAlternateRepresentations (cognitive 31) · ×1
  • DocumentationContext.analyzeAlternateRepresentations (cognitive 31) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:3211 — DocumentationContext.analyzeAlternateRepresentations has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 17). 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.
D2 · Cognitive Complexity · PathHierarchy.disambiguatedPaths · ×1
  • PathHierarchy.disambiguatedPaths::descend (cognitive 30) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift:108 — PathHierarchy.disambiguatedPaths::descend has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 5, loops 2 (3 pts) (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.
D2 · Cognitive Complexity · RenderNodeTranslator.renderGroups (cognitive 30) · ×1
  • RenderNodeTranslator.renderGroups (cognitive 30) Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift:1135 — RenderNodeTranslator.renderGroups has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (6 pts), match/switch 3 (5 pts), boolean chains 4 (nesting depth added 11). Of this number, 29 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.
D2 · Cognitive Complexity · Metadata.validate (cognitive 30) · ×1
  • Metadata.validate (cognitive 30) Sources/SwiftDocC/Semantics/Metadata/Metadata.swift:106 — Metadata.validate has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (11 pts), loops 5 (7 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.
D2 · Cognitive Complexity · DocumentationNode.initializeSymbolContent (cognitive 29) · ×1
  • DocumentationNode.initializeSymbolContent (cognitive 29) Sources/SwiftDocC/Model/DocumentationNode.swift:369 — DocumentationNode.initializeSymbolContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 7, loops 2 (5 pts), match/switch 1 (2 pts) (nesting depth added 7). 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.
D2 · Cognitive Complexity · MultipleChoice.init (cognitive 29) · ×1
  • MultipleChoice.init (cognitive 29) Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/MultipleChoice.swift:63 — MultipleChoice.init has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 3 (6 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · LinkDestinationSummary.init (cognitive 28) · ×1
  • LinkDestinationSummary.init (cognitive 28) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:16 — LinkDestinationSummary.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26 (27 pts), loops 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.
D2 · Cognitive Complexity · DeclarationsSectionTranslator.swift.postProcessTokens (cognitive 28) · ×1
  • DeclarationsSectionTranslator.swift.postProcessTokens (cognitive 28) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:308 — DeclarationsSectionTranslator.swift.postProcessTokens has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 6, loops 1 (nesting depth added 9). Of this number, 25 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.
D2 · Cognitive Complexity · GeneratedCurationWriter.generateDefaultCurationContents (cognitive 27) · ×1
  • GeneratedCurationWriter.generateDefaultCurationContents (cognitive 27) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift:116 — GeneratedCurationWriter.generateDefaultCurationContents has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · MarkdownRenderer.visit (cognitive 26) · ×1
  • MarkdownRenderer.visit (cognitive 26) Sources/DocCHTML/MarkdownRenderer.swift:572 — MarkdownRenderer.visit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (6 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · DocumentationContext.register (cognitive 26) · ×1
  • DocumentationContext.register (cognitive 26) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2073 — DocumentationContext.register has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 8 (9 pts), boolean chains 3 (nesting depth added 4). 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.
D2 · Cognitive Complexity · DeclarationsSectionTranslator.translateSection (cognitive 25) · ×1
  • DeclarationsSectionTranslator.translateSection (cognitive 25) Sources/SwiftDocC/Model/Rendering/RenderSectionTranslator/DeclarationsSectionTranslator.swift:71 — DeclarationsSectionTranslator.translateSection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 5 (8 pts), boolean chains 4 (nesting depth added 5). Of this number, 14 points are the body's own statements and 11 belong to 4 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.
D2 · Cognitive Complexity · DocumentationContentRenderer.renderReference (cognitive 24) · ×1
  • DocumentationContentRenderer.renderReference (cognitive 24) Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:265 — DocumentationContentRenderer.renderReference has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16, boolean chains 7, ternaries 1. Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · Article.init (cognitive 24) · ×1
  • Article.init (cognitive 24) Sources/SwiftDocC/Semantics/Article/Article.swift:132 — Article.init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · MarkdownOutputSemanticVisitor.visitSymbol (cognitive 24) · ×1
  • MarkdownOutputSemanticVisitor.visitSymbol (cognitive 24) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputSemanticVisitor.swift:213 — MarkdownOutputSemanticVisitor.visitSymbol has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 5 (9 pts), match/switch 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 9). Of this number, 21 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.
D2 · Cognitive Complexity · TopicRenderReferenceEncoder.addRenderReferences (cognitive 23) · ×1
  • TopicRenderReferenceEncoder.addRenderReferences (cognitive 23) Sources/SwiftDocC/Converter/TopicRenderReferenceEncoder.swift:24 — TopicRenderReferenceEncoder.addRenderReferences has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 1, loops 1, ternaries 1 (nesting depth added 8). Of this number, 19 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.
D2 · Cognitive Complexity · DocumentationContext.resolveLinks (cognitive 23) · ×1
  • DocumentationContext.resolveLinks (cognitive 23) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:566 — DocumentationContext.resolveLinks has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (10 pts), boolean chains 1 (nesting depth added 13). 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.
D2 · Cognitive Complexity · ExtractLinks.visitUnorderedList (cognitive 23) · ×1
  • ExtractLinks.visitUnorderedList (cognitive 23) Sources/SwiftDocC/Model/TaskGroup.swift:85 — ExtractLinks.visitUnorderedList has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 2 (3 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.
D2 · Cognitive Complexity · Symbol.mergeDeclaration (cognitive 23) · ×1
  • Symbol.mergeDeclaration (cognitive 23) Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:491 — Symbol.mergeDeclaration has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 8). Of this number, 18 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.
D2 · Cognitive Complexity · DisambiguationContainer._minimalSuggestedDisambiguationForFewParameters (cognitive 23) · ×1
  • DisambiguationContainer._minimalSuggestedDisambiguationForFewParameters (cognitive 23) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignatureDisambiguation.swift:66 — DisambiguationContainer._minimalSuggestedDisambiguationForFewParameters has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (10 pts), ternaries 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.
D2 · Cognitive Complexity · PreviewHTTPHandler.channelRead (cognitive 22) · ×1
  • PreviewHTTPHandler.channelRead (cognitive 22) Sources/DocCCommandLine/PreviewServer/PreviewHTTPHandler.swift:72 — PreviewHTTPHandler.channelRead has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, error handling 1 (2 pts), match/switch 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · DocumentationContext.resolveExternalSymbols (cognitive 22) · ×1
  • DocumentationContext.resolveExternalSymbols (cognitive 22) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:1574 — DocumentationContext.resolveExternalSymbols has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 6 (8 pts), boolean chains 3 (nesting depth added 7). 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.
D2 · Cognitive Complexity · DocumentationCurator.referenceFromLink (cognitive 22) · ×1
  • DocumentationCurator.referenceFromLink (cognitive 22) Sources/SwiftDocC/Infrastructure/DocumentationCurator.swift:51 — DocumentationCurator.referenceFromLink has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 4, loops 1, 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.
D2 · Cognitive Complexity · Symbol.init (cognitive 22) · ×1
  • Symbol.init (cognitive 22) Sources/SwiftDocC/Semantics/Symbol/Symbol.swift:286 — Symbol.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (4 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · CodeBlockOptions.tokenizeLanguageString (cognitive 22) · ×1
  • CodeBlockOptions.tokenizeLanguageString (cognitive 22) Sources/SwiftDocC/Model/Rendering/Content/RenderBlockContent.swift:361 — CodeBlockOptions.tokenizeLanguageString has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · JSONPatchApplier.apply (cognitive 22) · ×1
  • JSONPatchApplier.apply (cognitive 22) Sources/SwiftDocC/Model/Rendering/Variants/JSONPatchApplier.swift:140 — JSONPatchApplier.apply has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · FastSymbolGraphJSONDecoder._scanString (cognitive 21) · ×1
  • FastSymbolGraphJSONDecoder._scanString (cognitive 21) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:741 — FastSymbolGraphJSONDecoder._scanString has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (5 pts), boolean chains 3, loops 3 (nesting depth added 6). Of this number, 17 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.
D2 · Cognitive Complexity · GeneratedCurationWriter.defaultCurationText (cognitive 21) · ×1
  • GeneratedCurationWriter.defaultCurationText (cognitive 21) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift:40 — GeneratedCurationWriter.defaultCurationText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 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.
D2 · Cognitive Complexity · MarkupReferenceResolver.visitBlockDirective (cognitive 21) · ×1
  • MarkupReferenceResolver.visitBlockDirective (cognitive 21) Sources/SwiftDocC/Semantics/MarkupReferenceResolver.swift:160 — MarkupReferenceResolver.visitBlockDirective has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (3 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · MarkdownOutputMarkupWalker.convertLink (cognitive 21) · ×1
  • MarkdownOutputMarkupWalker.convertLink (cognitive 21) Sources/SwiftDocC/Model/MarkdownOutput/Translation/MarkdownOutputMarkdownWalker.swift:267 — MarkdownOutputMarkupWalker.convertLink has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 2 (nesting depth added 4). 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.
D2 · Cognitive Complexity · DisambiguationContainer._disambiguatedValues (cognitive 21) · ×1
  • DisambiguationContainer._disambiguatedValues (cognitive 21) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift:193 — DisambiguationContainer._disambiguatedValues has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 3 (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.
D2 · Cognitive Complexity · DisambiguationContainer.find (cognitive 21) · ×1
  • DisambiguationContainer.find (cognitive 21) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Find.swift:502 — DisambiguationContainer.find has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 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.
D2 · Cognitive Complexity · MergeAction.validateThatArchivesHaveDisjointData (cognitive 20) · ×1
  • MergeAction.validateThatArchivesHaveDisjointData (cognitive 20) Sources/DocCCommandLine/Action/Actions/Merge/MergeAction.swift:142 — MergeAction.validateThatArchivesHaveDisjointData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (10 pts) (nesting depth added 10). Of this number, 12 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · DeclarationFormatter._prettyPrintSwiftLikeFragments (cognitive 20) · ×1
  • DeclarationFormatter._prettyPrintSwiftLikeFragments (cognitive 20) Sources/DocCHTML/MarkdownRenderer+Declaration.swift:265 — DeclarationFormatter._prettyPrintSwiftLikeFragments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · _Tag.canOmitEndTag (cognitive 20) · ×1
  • _Tag.canOmitEndTag (cognitive 20) Sources/DocCHTML/HTMLFormatter.swift:484 — _Tag.canOmitEndTag has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 15, match/switch 2 (3 pts), if/else 2 (nesting depth added 1). 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.
D2 · Cognitive Complexity · DocumentationContext.preResolveExternalLinks (cognitive 20) · ×1
  • DocumentationContext.preResolveExternalLinks (cognitive 20) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:352 — DocumentationContext.preResolveExternalLinks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 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.
D2 · Cognitive Complexity · Availability.finalizePlatformFallbacks (cognitive 20) · ×1
  • Availability.finalizePlatformFallbacks (cognitive 20) Sources/SwiftDocC/Model/Availability.swift:241 — Availability.finalizePlatformFallbacks has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (9 pts), match/switch 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 9 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · SymbolGraphLoader.loadAll (cognitive 20) · ×1
  • SymbolGraphLoader.loadAll (cognitive 20) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphLoader.swift:55 — SymbolGraphLoader.loadAll has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (8 pts), if/else 4 (6 pts), loops 2 (4 pts), boolean chains 1, error handling 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.
D2 · Cognitive Complexity · Collection.separatedForTermDefinition (cognitive 20) · ×1
  • Collection.separatedForTermDefinition (cognitive 20) Sources/SwiftDocC/Model/Rendering/Content/Extensions/RenderTermLists.swift:129 — Collection.separatedForTermDefinition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · DocumentationContext.skipAutomaticCurationIfRedundant (cognitive 19) · ×1
  • DocumentationContext.skipAutomaticCurationIfRedundant (cognitive 19) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2545 — DocumentationContext.skipAutomaticCurationIfRedundant has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · DisambiguationContainer._disambiguateByTypeSignature (cognitive 19) · ×1
  • DisambiguationContainer._disambiguateByTypeSignature (cognitive 19) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift:426 — DisambiguationContainer._disambiguateByTypeSignature has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 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.
D2 · Cognitive Complexity · GeneratedDocumentationTopics.createCollectionNode (cognitive 18) · ×1
  • GeneratedDocumentationTopics.createCollectionNode (cognitive 18) Sources/SwiftDocC/Infrastructure/Symbol Graph/GeneratedDocumentationTopics.swift:99 — GeneratedDocumentationTopics.createCollectionNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · SymbolGraphRelationshipsBuilder.addImplementationRelationship (cognitive 18) · ×1
  • SymbolGraphRelationshipsBuilder.addImplementationRelationship (cognitive 18) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:59 — SymbolGraphRelationshipsBuilder.addImplementationRelationship has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · RenderContentCompiler.visitTable (cognitive 18) · ×1
  • RenderContentCompiler.visitTable (cognitive 18) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:307 — RenderContentCompiler.visitTable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (6 pts), boolean chains 2, match/switch 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.
D2 · Cognitive Complexity · build-script-helper.run (cognitive 18) · ×1
  • build-script-helper.run (cognitive 18) build-script-helper.py:98 — build-script-helper.run has cognitive complexity 18 (threshold 15). Drivers by points: error handling 5 (10 pts), if/else 7 (8 pts) (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.
D2 · Cognitive Complexity · ConvertFileWritingConsumer.consume (cognitive 17) · ×1
  • ConvertFileWritingConsumer.consume (cognitive 17) Sources/DocCCommandLine/Action/Actions/Convert/ConvertFileWritingConsumer.swift:89 — ConvertFileWritingConsumer.consume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 4, boolean chains 2 (nesting depth added 2). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
D2 · Cognitive Complexity · FastSymbolGraphJSONDecoder.decode (cognitive 17) · ×1
  • FastSymbolGraphJSONDecoder.decode (cognitive 17) Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift:305 — FastSymbolGraphJSONDecoder.decode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (6 pts), match/switch 1 (3 pts), error handling 2 (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.
D2 · Cognitive Complexity · AvailabilityItem.init (cognitive 17) · ×1
  • AvailabilityItem.init (cognitive 17) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:928 — AvailabilityItem.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · DocumentationContext.addOverloadGroupReferences (cognitive 17) · ×1
  • DocumentationContext.addOverloadGroupReferences (cognitive 17) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2428 — DocumentationContext.addOverloadGroupReferences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts) (nesting depth added 7). Of this number, 13 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.
D2 · Cognitive Complexity · LinkDestinationSummary.init (cognitive 17) · ×1
  • LinkDestinationSummary.init (cognitive 17) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:763 — LinkDestinationSummary.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 3 (4 pts), boolean chains 3, loops 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.
D2 · Cognitive Complexity · Variant.init (cognitive 17) · ×1
  • Variant.init (cognitive 17) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary.swift:901 — Variant.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 2 (4 pts) (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.
D2 · Cognitive Complexity · Availability.isBeta (cognitive 17) · ×1
  • Availability.isBeta (cognitive 17) Sources/SwiftDocC/Model/Availability.swift:433 — Availability.isBeta has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (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.
D2 · Cognitive Complexity · SemanticAnalyzer.visitDocument (cognitive 17) · ×1
  • SemanticAnalyzer.visitDocument (cognitive 17) Sources/SwiftDocC/Semantics/SemanticAnalyzer.swift:41 — SemanticAnalyzer.visitDocument has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 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.
D2 · Cognitive Complexity · ConvertService.convert (cognitive 17) · ×1
  • ConvertService.convert (cognitive 17) Sources/SwiftDocC/DocumentationService/Convert/ConvertService.swift:105 — ConvertService.convert has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, loops 1, ternaries 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.
D2 · Cognitive Complexity · SymbolGraphRelationshipsBuilder.addConformanceRelationship (cognitive 17) · ×1
  • SymbolGraphRelationshipsBuilder.addConformanceRelationship (cognitive 17) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:144 — SymbolGraphRelationshipsBuilder.addConformanceRelationship has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · build-script-helper.get_swiftpm_options (cognitive 17) · ×1
  • build-script-helper.get_swiftpm_options (cognitive 17) build-script-helper.py:201 — build-script-helper.get_swiftpm_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · UnsafeRawPointer.hasASCIIPrefix (cognitive 16) · ×1
  • UnsafeRawPointer.hasASCIIPrefix (cognitive 16) Sources/DocCCommon/JSONDecoding/UnsafeRawPointer+HasASCIIPrefix.swift:18 — UnsafeRawPointer.hasASCIIPrefix has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 2 (5 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · GeneratedCurationWriter.taskGroupsToWrite (cognitive 16) · ×1
  • GeneratedCurationWriter.taskGroupsToWrite (cognitive 16) Sources/SwiftDocC/Catalog Processing/GeneratedCurationWriter.swift:184 — GeneratedCurationWriter.taskGroupsToWrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (addProcessedTaskGroups). 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.
D2 · Cognitive Complexity · DocumentationContext.warnAboutMultipleRootPages (cognitive 16) · ×1
  • DocumentationContext.warnAboutMultipleRootPages (cognitive 16) Sources/SwiftDocC/Infrastructure/DocumentationContext.swift:2757 — DocumentationContext.warnAboutMultipleRootPages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · AvailabilityParser.deprecationMessage (cognitive 16) · ×1
  • AvailabilityParser.deprecationMessage (cognitive 16) Sources/SwiftDocC/Model/AvailabilityParser.swift:53 — AvailabilityParser.deprecationMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7 (nesting depth added 2). 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.
D2 · Cognitive Complexity · DocumentationNode.updateAnchorSections (cognitive 16) · ×1
  • DocumentationNode.updateAnchorSections (cognitive 16) Sources/SwiftDocC/Model/DocumentationNode.swift:114 — DocumentationNode.updateAnchorSections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 3). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · ParametersAndReturnValidator.traitSpecificSignatures (cognitive 16) · ×1
  • ParametersAndReturnValidator.traitSpecificSignatures (cognitive 16) Sources/SwiftDocC/Model/ParametersAndReturnValidator.swift:361 — ParametersAndReturnValidator.traitSpecificSignatures has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 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.
D2 · Cognitive Complexity · InvalidCodeBlockOption.visitCodeBlock (cognitive 16) · ×1
  • InvalidCodeBlockOption.visitCodeBlock (cognitive 16) Sources/SwiftDocC/Checker/Checkers/InvalidCodeBlockOption.swift:33 — InvalidCodeBlockOption.visitCodeBlock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 2, loops 1. Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function items inside it that branch (validateArrayIndices, matches). 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.
D2 · Cognitive Complexity · TopicGraph.dump (cognitive 16) · ×1
  • TopicGraph.dump (cognitive 16) Sources/SwiftDocC/Infrastructure/Topic Graph/TopicGraph.swift:326 — TopicGraph.dump has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), loops 1 (2 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.
D2 · Cognitive Complexity · RenderContext.createRenderedContent (cognitive 16) · ×1
  • RenderContext.createRenderedContent (cognitive 16) Sources/SwiftDocC/Model/Rendering/RenderContext.swift:37 — RenderContext.createRenderedContent has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, loops 5 (6 pts), if/else 1 (3 pts), ternaries 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.
D2 · Cognitive Complexity · Resources.init (cognitive 16) · ×1
  • Resources.init (cognitive 16) Sources/SwiftDocC/Semantics/Technology/Resources/Resources.swift:66 — Resources.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 2). 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.
D2 · Cognitive Complexity · PathParser.parse (cognitive 16) · ×1
  • PathParser.parse (cognitive 16) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:93 — PathParser.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 11 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.
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) Sources/SwiftDocC/Semantics/Article/Article.swift:109 — Sources/SwiftDocC/Semantics/Article/Article.swift:109-116 | Sources/SwiftDocC/Semantics/ContentAndMedia.swift:78-85 | Sources/SwiftDocC/Semantics/DirectiveConvertable.swift:70-77 | Sources/SwiftDocC/Semantics/Technology/Resources/Resources.swift:57-64 | Sources/SwiftDocC/Semantics/Technology/TutorialTableOfContents.swift:62-69 | Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift:66-73 | Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/MultipleChoice.swift:54-61 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Code.swift:62-69 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Step.swift:49-56 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Steps.swift:37-44 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/TutorialSection.swift:80-87 | Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:105-112 — These 12 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 12 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 12 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/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:41 — Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:41-55 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:58-72 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:75-89 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:92-106 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:147-167 — 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 · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.swift:26 — Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.swift:26-91 | Sources/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.swift:93-158 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift:75 — Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift:75-99 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/TutorialSection.swift:89-114 | Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:114-144 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (59 corresponding lines) · ×1
  • Edited copy of a member (59 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:928 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:928-995 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:542-600 — These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (51 corresponding lines) · ×1
  • Edited copy of a member (51 corresponding lines) Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:238 — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:238-288 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:294-347 — These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×1
  • Edited copy of a member (46 corresponding lines) Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:289 — Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:289-336 | Sources/SwiftDocC/Indexing/Navigator/NavigatorTree.swift:339-384 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:717 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:717-757 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1224-1263 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:32 — Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:32-72 | Sources/SwiftDocC/Utility/Collection+ConcurrentPerform.swift:107-145 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:131 — Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:131-154 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:195-218 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:226-255 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:62 — Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:62-81 | Sources/SwiftDocC/Model/Rendering/DocumentationContentRenderer.swift:84-107 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:67 — Sources/SwiftDocC/Model/Rendering/References/ImageReference.swift:67-82 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:75-92 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) Sources/SwiftDocC/Infrastructure/CoverageDataEntry.swift:934 — Sources/SwiftDocC/Infrastructure/CoverageDataEntry.swift:934-957 | Sources/SwiftDocC/Infrastructure/CoverageDataEntry.swift:962-985 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) Sources/SwiftDocC/Model/Section/Sections/DictionaryKeysSection.swift:21 — Sources/SwiftDocC/Model/Section/Sections/DictionaryKeysSection.swift:21-35 | Sources/SwiftDocC/Model/Section/Sections/HTTPParametersSection.swift:20-35 | Sources/SwiftDocC/Model/Section/Sections/HTTPResponsesSection.swift:21-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 9+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:159 — Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:159-167 | Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:68-76 | Sources/SwiftDocC/Model/Rendering/Symbol/RESTBodyRenderSection.swift:54-64 | Sources/SwiftDocC/Model/Rendering/Symbol/RESTEndpointRenderSection.swift:71-79 | Sources/SwiftDocC/Model/Rendering/Symbol/RESTParametersRenderSection.swift:60-69 | Sources/SwiftDocC/Model/Rendering/Symbol/RESTResponseRenderSection.swift:41-49 | Sources/SwiftDocC/Model/Rendering/Symbol/RelationshipsRenderSection.swift:50-59 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×1
  • Edited copy of a member (7 corresponding lines) Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialSectionsRenderSection.swift:68 — Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialSectionsRenderSection.swift:68-74 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/CallToActionSection.swift:48-56 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift:84 — Sources/SwiftDocC/Model/Rendering/References/LinkReference.swift:84-93 | Sources/SwiftDocC/Model/Rendering/References/UnresolvedReference.swift:45-53 | Sources/SwiftDocC/Model/Rendering/References/VideoReference.swift:134-144 | Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift:103-112 | Sources/SwiftDocC/Model/Rendering/Tutorial/References/XcodeRequirementReference.swift:41-50 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:49 — Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:49-62 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:70-83 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Symbol.swift:263-278 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:49 — Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:49-60 | Sources/SwiftDocC/Checker/Checkers/NonInclusiveLanguageChecker.swift:62-73 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) Sources/SwiftDocC/Semantics/Symbol/DocumentationDataVariants+SymbolGraphSymbol.swift:15 — Sources/SwiftDocC/Semantics/Symbol/DocumentationDataVariants+SymbolGraphSymbol.swift:15-32 | Sources/SwiftDocC/Semantics/Symbol/DocumentationDataVariants+SymbolGraphSymbol.swift:34-53 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/ContentRenderSection.swift:41 — Sources/SwiftDocC/Model/Rendering/Symbol/ContentRenderSection.swift:41-48 | Sources/SwiftDocC/Model/Rendering/Symbol/ParameterRenderSection.swift:52-59 | Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:87-94 | Sources/SwiftDocC/Model/Rendering/Tutorial Article/TutorialArticleSection.swift:95-102 | Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/ResourcesRenderSection.swift:35-43 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift:22 — Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift:22-38 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift:41-59 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift:62-77 | Sources/SwiftDocC/Model/Rendering/Variants/VariantCollection+Coding.swift:84-98 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) Sources/DocCCommandLine/ArgumentParsing/ArgumentValidation/URLArgumentValidator.swift:26 — Sources/DocCCommandLine/ArgumentParsing/ArgumentValidation/URLArgumentValidator.swift:26-36 | Sources/DocCCommandLine/ArgumentParsing/ArgumentValidation/URLArgumentValidator.swift:48-58 | Sources/DocCCommandLine/ArgumentParsing/ArgumentValidation/URLArgumentValidator.swift:70-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) Sources/DocCHTML/HTMLNode+Tags.swift:299 — Sources/DocCHTML/HTMLNode+Tags.swift:299-302 | Sources/DocCHTML/HTMLNode+Tags.swift:896-900 | Sources/DocCHTML/HTMLNode+Tags.swift:1074-1077 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:90 — Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:90-92 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:295-297 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:299-301 | Sources/SwiftDocC/Model/Rendering/RenderContentCompiler.swift:358-360 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 5+ corresponding lines) Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:42 — Sources/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.swift:42-47 | Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift:57-62 | Sources/SwiftDocC/Model/Rendering/Symbol/PropertiesRenderSection.swift:45-50 | Sources/SwiftDocC/Model/Rendering/Symbol/SampleDownloadSection.swift:39-43 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 3+ corresponding lines) Sources/SwiftDocC/Semantics/ContentAndMedia.swift:110 — Sources/SwiftDocC/Semantics/ContentAndMedia.swift:110-112 | Sources/SwiftDocC/Semantics/Media/ImageMedia.swift:70-72 | Sources/SwiftDocC/Semantics/Media/VideoMedia.swift:80-82 | Sources/SwiftDocC/Semantics/Symbol/DeprecationSummary.swift:66-68 | Sources/SwiftDocC/Semantics/Technology/Resources/Tile.swift:220-222 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Code.swift:101-103 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. 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. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (11–29 lines × 2) · ×1
  • Duplicated block (11–29 lines × 2) Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:383 — Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:383-393 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift:580-608 — 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.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:145 — Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:145-169 | Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:234-258 — 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/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:145` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 3) · ×1
  • Duplicated block (20–21 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:365 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:365-385 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:582-602 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1159-1178 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:365` 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.
D4 · Code Duplication · Duplicated block (18–19 lines × 5) · ×1
  • Duplicated block (18–19 lines × 5) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:379 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:379-397 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:596-614 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1102-1120 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:631-648 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1172-1190 — there are 5 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 5 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:379` 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. 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.
D4 · Code Duplication · Duplicated block (18 lines × 5) · ×1
  • Duplicated block (18 lines × 5) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:331 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:331-348 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1188-1205 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1271-1288 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1513-1530 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1065-1082 — there are 5 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 5 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:331` 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:190 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:190-207 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:634-651 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.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.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:688 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:688-705 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:207-223 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:688` 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. 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 5) · ×1
  • Duplicated block (16–17 lines × 5) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:375 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:375-391 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:592-608 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1182-1197 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:628-643 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1168-1184 — there are 5 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 5 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:375` 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:893 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:893-909 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1265-1280 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:893` 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.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:378 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:378-393 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:595-610 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1101-1116 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1184-1199 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:630-645 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1171-1186 — there are 6 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 6 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:378` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1201` calls `makeKeyNotFoundError` and `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:395` 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.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:733 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:733-747 | Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+FastJSONDecodable.swift:112-127 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:733` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:749` calls `makeKeyNotFoundError` and `Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver+FastJSONDecodable.swift:129` 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:970 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:970-985 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:577-590 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:970` 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:135 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:135-149 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:687-701 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:206-220 — 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:135` 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:176 — Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:176-189 | Sources/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:263-277 — 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/SwiftDocC/Infrastructure/Symbol Graph/SymbolGraphRelationshipsBuilder.swift:176` 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 6) · ×1
  • Duplicated block (13–14 lines × 6) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:51 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:51-63 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:337-349 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:557-569 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1194-1207 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:1519-1531 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1071-1084 — there are 6 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 6 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:51` 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtLeastOne.swift:69 — Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtLeastOne.swift:69-82 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtMostOne.swift:68-81 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasExactlyOne.swift:69-81 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasExactlyOne.swift:90-102 — there are 4 copies across 3 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 4 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/SwiftDocC/Semantics/General Purpose Analyses/HasAtLeastOne.swift:69` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `diagnostics` to `inout [Diagnostic]) -> ([Child]` in one and `inout [Diagnostic]) -> (Child?` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) Sources/SwiftDocC/Semantics/General Purpose Analyses/Extract.swift:50 — Sources/SwiftDocC/Semantics/General Purpose Analyses/Extract.swift:50-59 | Sources/SwiftDocC/Semantics/General Purpose Analyses/HasAtLeastOne.swift:56-66 — 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/SwiftDocC/Semantics/General Purpose Analyses/Extract.swift:50` 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:43 — Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:43-52 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:60-69 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:77-86 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:94-103 — 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/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:43` 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) Sources/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift:26 — Sources/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift:26-35 | Sources/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift:40-49 | Sources/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift:59-68 — 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/SwiftDocC/Infrastructure/Diagnostics/ParseDirectiveArguments.swift:26` 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Sources/DocCHTML/HTMLFormatter.swift:347 — Sources/DocCHTML/HTMLFormatter.swift:347-356 | Sources/DocCHTML/HTMLFormatter.swift:414-422 — 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/DocCHTML/HTMLFormatter.swift:347` 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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:76 — Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:76-84 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:370-378 | Sources/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:587-595 | Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:1164-1171 — there are 4 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 4 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/DocCCommon/JSONDecoding/SymbolGraph+FastJSONDecodable.swift:76` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) Sources/DocCTestUtilities/FilesAndFolders.swift:498 — Sources/DocCTestUtilities/FilesAndFolders.swift:498-505 | Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+Dump.swift:80-87 | Sources/SwiftDocC/Infrastructure/Topic Graph/TopicGraph.swift:335-342 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/DocCTestUtilities/FilesAndFolders.swift:498` 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) Sources/DocCHTML/MarkdownRenderer.swift:291 — Sources/DocCHTML/MarkdownRenderer.swift:291-301 | Sources/DocCHTML/MarkdownRenderer.swift:344-355 — 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/DocCHTML/MarkdownRenderer.swift:344` 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. 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:46 — Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:46-52 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:63-69 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:80-86 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:97-103 | Sources/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:158-164 — all 5 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/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.swift:46` 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.
D4 · Code Duplication · Duplicated block (6 lines × 12) · ×1
  • Duplicated block (6 lines × 12) Sources/SwiftDocC/Semantics/Article/Article.swift:111 — Sources/SwiftDocC/Semantics/Article/Article.swift:111-116 | Sources/SwiftDocC/Semantics/ContentAndMedia.swift:80-85 | Sources/SwiftDocC/Semantics/DirectiveConvertable.swift:72-77 | Sources/SwiftDocC/Semantics/Technology/Resources/Resources.swift:59-64 | Sources/SwiftDocC/Semantics/Technology/TutorialTableOfContents.swift:64-69 | Sources/SwiftDocC/Semantics/Technology/Volume/Volume.swift:68-73 | Sources/SwiftDocC/Semantics/Tutorial/Assessments/Multiple Choice/MultipleChoice.swift:56-61 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Code.swift:64-69 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Step.swift:51-56 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/Steps/Steps.swift:39-44 | Sources/SwiftDocC/Semantics/Tutorial/Tasks/TutorialSection.swift:82-87 | Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.swift:107-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 12 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 12 times. 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.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) Sources/SwiftDocC/Semantics/Options/AutomaticArticleSubheading.swift:40 — Sources/SwiftDocC/Semantics/Options/AutomaticArticleSubheading.swift:40-51 | Sources/SwiftDocC/Semantics/Options/AutomaticSeeAlso.swift:37-48 | Sources/SwiftDocC/Semantics/Options/AutomaticTitleHeading.swift:39-50 — 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 all 3 call sites, so a change lands once.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity Sources/DocCCommandLine/CommandLine.docc/footer.html:10 — `https://swift.org/assets/javascripts/docc/footer.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 6 such include(s) across the repository's markup.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) Sources/SwiftDocC/DocumentationService/Convert/Symbol Link Resolution/LinkCompletionTools.swift:225 — `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.
Minor — 157 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×107
  • Orphaned file Sources/SwiftDocC/Infrastructure/Topic Graph/TopicGraph.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/SwiftDocC/Model/Kind.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/SwiftDocC/Semantics/DirectiveInfrastructure/AutomaticDirectiveConvertible.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/SwiftDocC/Model/Rendering/Content/Extensions/RenderTermLists.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/SwiftDocC/Checker/Checker.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/SwiftDocC/Model/Rendering/RenderNode.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/SwiftDocC/Indexing/Navigator/AvailabilityIndex+Ext.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/SwiftDocC/Indexing/RenderSection+TextIndexing.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/SwiftDocC/Model/Rendering/Variants/JSONPatchApplier.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/SwiftDocC/Model/Rendering/Content/RenderInlineContent.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/SwiftDocC/Infrastructure/NodeURLGenerator.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/SwiftDocC/Semantics/DirectiveInfrastructure/DirectiveMirror.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/SwiftDocC/Model/Rendering/Diffing/AnyRenderSection.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/SwiftDocC/Infrastructure/Communication/Code colors/CodeColors.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/SwiftDocC/Model/Rendering/Diffing/Differences.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/SwiftDocC/Model/Rendering/Diffing/DifferenceBuilder.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/SwiftDocC/Semantics/Walker/Walkers/SemanticTreeDumper.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/SwiftDocC/Model/Rendering/RenderNode/RenderNode+Codable.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/SwiftDocC/Semantics/Tutorial/Tutorial.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/SwiftDocC/Model/Rendering/Symbol/AttributesRenderSection.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/SwiftDocC/Infrastructure/Symbol Graph/SymbolReference.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/SwiftDocC/Utility/LMDB/LMDB+Transaction.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/SwiftDocC/Utility/LMDB/LMDB+Environment.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/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.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/SwiftDocC/Indexing/Navigator/AvailabilityIndex.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.
  • + 82 more in this group — see findings.md.
D10 · Test Quality · No direct assertions · ×28
  • No direct assertions: renderingBreadcrumbs Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:20 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingAvailability Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:82 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingSingleLanguageParameters Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:125 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingLanguageSpecificParameters Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:184 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingManyLanguageSpecificParameters Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:225 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingSingleLanguageReturnSections Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:265 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingLanguageSpecificReturnSections Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:294 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingSingleLanguageGroupedSectionsWithMultiLanguageLinks Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:895 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: testDiscussionSectionWithoutHeading Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:1054 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: testDiscussionSectionWithHeading Tests/DocCHTMLTests/MarkdownRenderer+PageElementsTests.swift:1086 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingParagraphsWithFormattedText Tests/DocCHTMLTests/MarkdownRendererTests.swift:18 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingHeadings Tests/DocCHTMLTests/MarkdownRendererTests.swift:36 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingTables Tests/DocCHTMLTests/MarkdownRendererTests.swift:108 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingLists Tests/DocCHTMLTests/MarkdownRendererTests.swift:214 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingAsides Tests/DocCHTMLTests/MarkdownRendererTests.swift:265 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingSmallDirective Tests/DocCHTMLTests/MarkdownRendererTests.swift:291 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingTabNavigatorDirective Tests/DocCHTMLTests/MarkdownRendererTests.swift:303 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingImageDirective Tests/DocCHTMLTests/MarkdownRendererTests.swift:353 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingRowAndColumnDirectives Tests/DocCHTMLTests/MarkdownRendererTests.swift:413 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingCodeBlocks Tests/DocCHTMLTests/MarkdownRendererTests.swift:451 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingMiscellaneousElements Tests/DocCHTMLTests/MarkdownRendererTests.swift:491 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingRelativeLinksToOtherPages Tests/DocCHTMLTests/MarkdownRendererTests.swift:511 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingFallbackLinkTextForUnresolvedDocumentationLinks Tests/DocCHTMLTests/MarkdownRendererTests.swift:621 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingFallbackLinkTextForUnresolvedSymbolLinks Tests/DocCHTMLTests/MarkdownRendererTests.swift:634 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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: renderingRelativeLinksToLocalImages Tests/DocCHTMLTests/MarkdownRendererTests.swift:643 — No conventional assertion call was detected, and 28 of 51 tests in `DocCHTMLTests` 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.
  • + 3 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×7
  • Duplicated predicate Sources/SwiftDocC/Semantics/Media/ImageMedia.swift:51 — `!featureFlags.isExperimentalDeviceFrameSupportEnabled && deviceFrame != nil` appears character-identically in 2 files — Sources/SwiftDocC/Semantics/Media/ImageMedia.swift, Sources/SwiftDocC/Semantics/Media/VideoMedia.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/DocCCommandLine/PreviewServer/PreviewHTTPHandler.swift:78 — `!os(Linux) && !os(Android) && !os(Windows) && !os(FreeBSD) && !os(OpenBSD)` appears character-identically in 3 files — Sources/DocCCommandLine/PreviewServer/PreviewHTTPHandler.swift, Sources/DocCCommandLine/PreviewServer/RequestHandler/DefaultRequestHandler.swift, Sources/DocCCommandLine/Utility/DirectoryMonitor.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/SwiftDocC/Semantics/Tutorial/Tutorial.swift:147 — `$0.kind == .tutorialTableOfContents || $0.kind == .chapter || $0.kind == .volume` appears character-identically in 2 files — Sources/SwiftDocC/Semantics/Tutorial/Tutorial.swift, Sources/SwiftDocC/Semantics/TutorialArticle/TutorialArticle.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/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift:40 — `existingParameter.required || newParameter.required` appears character-identically in 2 files — Sources/SwiftDocC/Model/Section/Sections/HTTPBodySection.swift, Sources/SwiftDocC/Model/Section/Sections/HTTPParametersSection.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/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift:962 — `propertyListRawKey != nil || propertyListTitleStyle != nil || propertyListDisplayName != nil` appears character-identically in 2 files — Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift, Sources/SwiftDocC/Model/Rendering/References/TopicRenderReference.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/SwiftDocC/Model/Rendering/Symbol/ParameterRenderSection.swift:63 — `self.name == other.name || self.content == other.content` appears character-identically in 3 files — Sources/SwiftDocC/Model/Rendering/Symbol/ParameterRenderSection.swift, Sources/SwiftDocC/Model/Rendering/Symbol/PossibleValuesRenderSection.swift, Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/VolumeRenderSection.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/SwiftDocC/Model/Rendering/Symbol/RESTBodyRenderSection.swift:68 — `self.title == other.title || self.content == other.content` appears character-identically in 4 files — Sources/SwiftDocC/Model/Rendering/Symbol/RESTBodyRenderSection.swift, Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/IntroRenderSection.swift, Sources/SwiftDocC/Model/Rendering/Tutorial/Sections/TutorialAssessmentsRenderSection.swift, Sources/SwiftDocC/Model/Rendering/Tutorials Overview/Sections/ContentAndMediaSection.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.
D21 · Naming Consistency · `baseUrl` spells `Url` where 103 names in the project spell it `URL` · ×2
  • `baseUrl` spells `Url` where 103 names in the project spell it `URL` Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift:222 — 103 of 106 names in project DocCCommandLine spell the token `URL` (103 of 106; unit: names in project DocCCommandLine containing `URL`). Peers: ConvertAction.rootURL (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:26); ConvertAction.init(documentationBundleURL) (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:96); EmitGeneratedCurationAction.catalogURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:16); EmitGeneratedCurationAction.outputURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:18); EmitGeneratedCurationAction.init(outputURL) (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:24). Rename to `baseURL`. [rule N6]
  • `baseUrl` spells `Url` where 103 names in the project spell it `URL` Sources/SwiftDocC/Infrastructure/Diagnostics/DiagnosticConsoleWriter.swift:230 — 103 of 106 names in project DocCCommandLine spell the token `URL` (103 of 106; unit: names in project DocCCommandLine containing `URL`). Peers: ConvertAction.rootURL (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:26); ConvertAction.init(documentationBundleURL) (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:96); EmitGeneratedCurationAction.catalogURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:16); EmitGeneratedCurationAction.outputURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:18); EmitGeneratedCurationAction.init(outputURL) (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:24). Rename to `baseURL`. [rule N6]
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 45 significant file(s) lose their only recent owner: Sources/DocCCommon/JSONDecoding/FastSymbolGraphJSONDecoder.swift, Sources/SwiftDocC/LinkTargets/LinkDestinationSummary+FastJSONDecodable.swift, Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+TypeSignature.swift, Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+DisambiguatedPaths.swift, Sources/SwiftDocC/Infrastructure/Link Resolution/PathHierarchy+PathComponent.swift, Sources/SwiftDocC/Model/Identifier.swift, Sources/generate-symbol-graph/main.swift, Sources/DocCHTML/HTMLFormatter.swift (+37 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 4 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 (50 single-owned of 323 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; 323 of the 557 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (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/SwiftDocC/Indexing/RenderNode+Indexable.swift, Sources/SwiftDocC/Indexing/RenderBlockContent+TextIndexing.swift, Sources/SwiftDocC/Converter/TopicRenderReferenceEncoder.swift, Sources/SwiftDocC/Semantics/Reference/Row.swift, Sources/SwiftDocC/Model/Rendering/RenderNode/CodableContentSection.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found Package.swift:76 — 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/`. ADRs are expected here because `Package.swift` makes this repository a deployable product (line 76).
D21 · Naming Consistency · `encodeUrlVerbatim` spells `Url` where 103 names in the project spell it `URL` · ×1
  • `encodeUrlVerbatim` spells `Url` where 103 names in the project spell it `URL` Sources/SwiftDocC/Model/Rendering/Tutorial/References/DownloadReference.swift:39 — 103 of 106 names in project DocCCommandLine spell the token `URL` (103 of 106; unit: names in project DocCCommandLine containing `URL`). Peers: ConvertAction.rootURL (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:26); ConvertAction.init(documentationBundleURL) (Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift:96); EmitGeneratedCurationAction.catalogURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:16); EmitGeneratedCurationAction.outputURL (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:18); EmitGeneratedCurationAction.init(outputURL) (Sources/DocCCommandLine/Action/Actions/EmitGeneratedCurationAction.swift:24). Rename to `encodeURLVerbatim`. [rule N6]
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 107 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: Sources/SwiftDocC/Model/Kind.swift, Sources/SwiftDocC/Semantics/DirectiveInfrastructure/AutomaticDirectiveConvertible.swift, Sources/SwiftDocC/Model/Rendering/Content/Extensions/RenderTermLists.swift, Sources/SwiftDocC/Checker/Checker.swift, Sources/SwiftDocC/Model/Rendering/RenderNode.swift, Sources/SwiftDocC/Indexing/Navigator/AvailabilityIndex+Ext.swift, Sources/SwiftDocC/Indexing/RenderSection+TextIndexing.swift, Sources/SwiftDocC/Model/Rendering/Variants/JSONPatchApplier.swift (and 99 more) (111 orphaned of 326 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; 326 of the 557 production source files in this repository met that bar). 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 1/2 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:7 — 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 2 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch Sources/DocCCommandLine/Action/Actions/Merge/MergeAction+SynthesizedLandingPage.swift:40 — `inner` (in `readRootNodeRenderReferencesIn`) turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
Minor — 18 finding(s)
D10 · Test Quality · Skipped (documented) · ×14
  • Skipped (documented): fillsInFallbackAvailabilityFromDefaultAvailability Tests/SwiftDocCTests/Model/AvailabilityTests.swift:26 — 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
  • Skipped (documented): symbolsMissingFromSpecificPlatformsDoNotDisplayInSourceAvailabilityForThosePlatforms Tests/SwiftDocCTests/Model/AvailabilityTests.swift:830 — 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
  • Skipped (documented): symbolIsConsideredDeprecatedWhenOnlyAvailableDirectiveHasDeprecatedVersion Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1360 — 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
  • Skipped (documented): articleIsConsideredDeprecatedWhenOnlyAvailableDirectiveHasDeprecatedVersion Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1412 — 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
  • Skipped (documented): symbolIsConsideredDeprecatedWithWarningWhenAvailableWithDeprecationSummaryDirective Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1568 — 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
  • Skipped (documented): symbolIsConsideredDeprecatedWhenCustomPlatformIsDeprecated Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1677 — 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
  • Skipped (documented): articleIsConsideredDeprecatedWhenAvailableWithDeprecationSummaryDirective Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1755 — 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
  • Skipped (documented): symbolIsConsideredInBetaWhenOnlyPlatformIsCurrentlyInBeta Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1901 — 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
  • Skipped (documented): articleIsConsideredInBetaWhenOnlyPlatformIsCurrentlyInBeta Tests/SwiftDocCTests/Model/AvailabilityTests.swift:1963 — 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
  • Skipped (documented): articleIsNotConsideredInBetaWhenIntroducedBeforeCurrentVersion Tests/SwiftDocCTests/Model/AvailabilityTests.swift:2072 — 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
  • Skipped (documented): articleDisplaysCustomDefaultPlatformAfterKnownPlatforms Tests/SwiftDocCTests/Model/AvailabilityTests.swift:2295 — 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
  • Skipped (documented): displaysCustomDefaultPlatformsInAlphabeticalOrder Tests/SwiftDocCTests/Model/AvailabilityTests.swift:2379 — 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
  • Skipped (documented): symbolVariantDisplaysTheirOwnInSourceAvailability Tests/SwiftDocCTests/Model/AvailabilityTests.swift:2426 — 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
  • Skipped (documented): combinesAvailabilityFromMultipleSources Tests/SwiftDocCTests/Model/AvailabilityTests.swift:2514 — 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
D12 · Dependency Hygiene · Outdated · ×3
  • Outdated: swift-argument-parser — `swift-argument-parser` is resolved at 1.4.0, but 1.8.2 is the newest release tagged on https://github.com/apple/swift-argument-parser.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-argument-parser` reaches this one with no change to Package.swift.
  • Outdated: swift-docc-plugin — `swift-docc-plugin` is resolved at 1.4.4, but 1.5.0 is the newest release tagged on https://github.com/swiftlang/swift-docc-plugin.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-docc-plugin` reaches this one with no change to Package.swift.
  • Outdated: swift-nio — `swift-nio` is resolved at 2.92.2, but 2.105.0 is the newest release tagged on https://github.com/apple/swift-nio.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio` reaches this one with no change to Package.swift.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: DocCCommon (SwiftPM) — DocCCommon (SwiftPM): abstractness 0.10, instability 0.00, distance 0.90 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7d12e7413e76476db01ef43ea8b41175/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-7d12e7413e76476db01ef43ea8b41175/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .11artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .1artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .1artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—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 96 file(s) — `Sources/DocCCommandLine/Action/Action.swift`, `Sources/DocCCommandLine/Action/Actions/Convert/ConvertAction.swift`, `Sources/DocCCommandLine/Action/Actions/Merge/MergeAction+SynthesizedLandingPage.swift`, `Sources/DocCCommandLine/ArgumentParsing/ActionExtensions/Action+performAndHandleResult.swift`, `Sources/DocCCommandLine/ArgumentParsing/ActionExtensions/ConvertAction+CommandInitialization.swift`, … (+91 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1dd0e-ba96-7856-b38e-28be1d8ea6f9 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md