Skip to content
CAI
Software that uses CAICheck a score

swiftlang/swift-markdown

54.9

Adequate · 14 November 2026

8.6k

lines of production code

Swift

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added Swift code snippets for Markdown API usage

Added a collection of Swift code examples in the Snippets directory demonstrating how to use the Markdown library. These include formatting options (such as autolinks, line prefixes, emphasis markers, and list styles), parsing documents from strings or files, querying the markup tree, rewriting elements, and converting to XML.

Snippets · high confidence

New HTML conversion tool and Doxygen parsing support in markdown-tool

The markdown-tool now includes a new 'print-html' command that converts Markdown content into HTML, supporting options to parse block quotes as asides and inline attributes as classes. Additionally, the tool adds experimental support for parsing a minimal set of Doxygen commands via the '--experimental-parse-doxygen-commands' flag in the dump-tree command. Under the hood, UTF-8 decoding has been modernized to use Swift's 'String(decoding:as:)' initializer, and the tool's entry point has been updated to use the '@main' attribute.

Tools · high confidence

Swift Markdown adds Doxygen command support and HTML formatting

Swift Markdown now parses and represents Doxygen commands (\\abstract, \\discussion, \\note, \\param, and \\returns) as structured markup nodes, allowing them to be processed alongside standard Markdown. An HTML formatter has been added to convert markup trees into HTML, including support for parsing blockquotes as asides and handling inline attributes. The library also introduces custom inline attributes, allows unnamed first arguments in block directive syntax, and marks core types as Sendable for thread safety.

Sources · high confidence

Behavioural changes

Automated documentation publishing and enhanced source code validation

A new script, bin/update-gh-pages-documentation-site, has been added to automate the generation and deployment of documentation to the GitHub Pages site using Swift Package Manager's DocC tooling. Additionally, the bin/check-source script now validates license headers in Swift snippet files, excludes Tools/.build from checks, and accepts copyright years through 2025.

bin · high confidence

Introduce CMake-based build system with expanded architecture support

The project now uses CMake for building, replacing the previous build method. This change adds support for several new architectures, including RISC-V 64-bit (riscv64), FreeBSD powerpc64le and powerpc64, and Windows ARM64, by recognizing these processors in the build configuration. It also refines how build-tree exports are handled, ensuring that SwiftMarkdown targets are only exported when it is the top-level project to avoid dragging in unnecessary transitive dependencies for subprojects. Additionally, the build system now correctly handles Swift module installation for non-Darwin platforms.

cmake · high confidence

Migration to swiftlang organization and addition of CMake build system

Swift Markdown has moved to the swiftlang GitHub organization, updating all repository URLs and dependency references (such as swift-syntax and swift-markdown) from the previous apple/swift-markdown location. The project now supports building via CMake (minimum version 3.29) in addition to Swift Package Manager, introducing a new build configuration that fetches dependencies like ArgumentParser and cmark-gfm. Documentation and contributing guides have been updated to reflect the new GitHub Issues workflow and point to the new documentation site, while the README has been streamlined to remove detailed API examples in favor of external documentation links.

(repo-wide) · high confidence

Test coverage

60 commits adding/updating tests in Tests

Test coverage in Tests — 60 commits (16 fixs), 47 files.

Tests · high confidence · unverified

Dependencies

Swift 6.2 upgrade and dependency restructuring

The project upgrades its minimum Swift version to 6.2 and updates the \swift-cmark\ dependency URL to the \swiftlang\ organization. The \swift-argument-parser\ dependency is removed from the main library, and a new \Tools\ package is introduced to provide a standalone \markdown-tool\ executable that includes this parser. Additionally, the main package now conditionally includes the \swift-docc-plugin\ for Swift 5.6+ environments and excludes \CMakeLists.txt\ from the Markdown target.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 55 → 55 (-0.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 95 → 90 (-4.8)
  • Architecture 90 → 91 (+0.3)
  • Maturity 49 → 49 (+0.0)
  • Readiness 38 → 38 (-0.2)
  • Security 100 → 100 (+0.0)

Resolved (2)

  • Duplicated block (6 lines × 3) (Sources/Markdown/Inline Nodes/Inline Containers/Emphasis.swift)
  • Duplicated block (8 lines × 2) (Sources/Markdown/Base/DirectiveArgument.swift)

New (18)

  • Duplicated block (6 lines × 3) (Sources/Markdown/Inline Nodes/Inline Containers/Emphasis.swift)
  • Duplicated block (9 lines × 2) (Sources/Markdown/Base/DirectiveArgument.swift)
  • Edited copies of one member (3 members, 14+ corresponding lines) (Snippets/Rewriters/RemoveElementKind.swift)
  • Edited copies of one member (3 members, 14+ corresponding lines) (Sources/Markdown/Parser/BlockDirectiveParser.swift)
  • Edited copies of one member (3 members, 3+ corresponding lines) (Sources/Markdown/Block Nodes/Block Container Blocks/ListItem.swift)
  • Edited copies of one member (4 members, 3+ corresponding lines) (Sources/Markdown/Block Nodes/Block Container Blocks/Doxygen Commands/DoxygenAbstract.swift)
  • Edited copies of one member (4 members, 7+ corresponding lines) (Sources/Markdown/Inline Nodes/Inline Containers/Image.swift)
  • Edited copies of one member (4 members, 7+ corresponding lines) (Sources/Markdown/Parser/CommonMarkConverter.swift)
  • Edited copies of one member (5 members, 6+ corresponding lines) (Sources/Markdown/Block Nodes/Tables/TableBody.swift)
  • Edited copies of one member (7 members, 15+ corresponding lines) (Snippets/Formatting/CondenseAutolinks.swift)
  • Edited copies of one member (8 members, 5+ corresponding lines) (Sources/Markdown/Base/Document.swift)
  • Edited copy of a member (11 corresponding lines) (Sources/Markdown/Base/MarkupChildren.swift)
  • Edited copy of a member (17 corresponding lines) (Snippets/Formatting/DefaultFormatting.swift)
  • Edited copy of a member (17 corresponding lines) (Sources/Markdown/Inline Nodes/Inline Containers/Image.swift)
  • Edited copy of a member (23 corresponding lines) (Sources/Markdown/Walker/Walkers/MarkupFormatter.swift)
  • Edited copy of a member (3 corresponding lines) (Sources/Markdown/Block Nodes/Block Container Blocks/OrderedList.swift)
  • Edited copy of a member (3 corresponding lines) (Sources/Markdown/Block Nodes/Tables/TableHead.swift)
  • High interface indirection

Changes since last survey

  • 1 commits — 0 feature/other, 1 fixes

By area

  • Sources/Markdown — 1 commit

Notable commits

  • fix: Fix table column alignment after spanned cells (#298)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

swiftlang/swift-markdown was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ea1d88be47afe8a731b3971d7b3fb7a3a6db1a5a — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.