Skip to content
CAI
Produce a survey ↗Verify a survey

krzysztofzablocki/Sourcery

Sourcery is a code generation tool for Swift that parses source code using SwiftSyntax to produce boilerplate implementations for common patterns such as Equatable, Hashable, Codable, and mocking. It supports multiple template engines, including Stencil, JavaScript (EJS), and native Swift templates, allowing users to define custom code generation logic. The system provides built-in templates for standard protocols, type introspection, and Linux compatibility, while also supporting custom plugin integration via Swift Package Manager.

54.3

Adequate · 3 August 2026

34k

lines of production code

Swift

with JavaScript

3

bus factor · 185 authors in all

3

measurements over time

CAI band scale
CAI trend line

How it got here

2016 · Sourcery 2.3.0 release and test expansion

This period focused on the release of Sourcery 2.3.0, introducing support for xcframeworks, Swift Package Manager, and Linux, alongside new build scripts and template features. Significant effort was also dedicated to expanding test coverage for the parser, code generator, and various Swift language constructs.

17 changes

2017 · Template expansion and test coverage

This period focused on expanding the library of code generation templates, introducing new generators for Swift protocols, testing infrastructure, and JavaScript support. Significant effort was dedicated to building a comprehensive test suite to validate template outputs and ensure compatibility across multiple Xcode and Swift versions.

13 changes

2018–2022 · Template engine and parsing modernization

This period focused on modernizing the template engine architecture by introducing Swift, Stencil, and JavaScript-based template rendering, alongside migrating to SwiftSyntax for code parsing. The team also expanded the runtime API with type inspection helpers and added comprehensive test coverage for parsing and code generation logic.

14 changes

2023–2024 · Linux platform support and AST expansion

This period focused on enabling full functionality on the Linux platform by adding specific test cases, stubs, and AST model classes. The work also expanded the Swift type system representation and improved type resolution in the code generator.

6 changes

CAI lens gauges

Survey your own repository

krzysztofzablocki/Sourcery 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 the surveyor at a repository you know and see whether you agree with it.

Survey a repository

About this page

  • The description of this project is derived from its own commit history, not from its README.
  • The score is its highest published measurement, taken on 3 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f9d80ddec1 — the exact code this score is about.
  • Scored under rubric rubric-2026.08.18. Score the same commit under that rubric and you get the same number.
CAI link cards