jpsim/SourceKitten
63.6
Adequate · 1 October 2026
5.4k
lines of production code
Swift
with C
1
measurement over time
What this system is
SourceKitten is a command-line tool that provides programmatic access to Swift and Objective-C source code analysis via the SourceKit service. It exposes capabilities for indexing, syntax highlighting, code completion, and documentation generation through a structured API and CLI. The system supports precise byte-level operations and integrates with modern build systems like Bazel and Swift Package Manager.
Features
Add Bazel build support
SourceKitten now supports building with Bazel. This change introduces Bazel configuration files (\.bazelrc\, \.bazelversion\, \MODULE.bazel\, \BUILD\, \WORKSPACE\) and updates the \Makefile\ to support Bazel-specific targets like \docker\_test\. It also adds a \Dangerfile\ to enforce changelog entries for code changes and updates the \.gitignore\ to exclude Bazel artifacts.
(repo-wide) · high confidence
Introduces ByteCount and ByteRange types for precise byte-level string operations
The framework now exposes \ByteCount\ and \ByteRange\ as public value types to model byte offsets and ranges within source files. This change replaces previous integer-based offset handling with a dedicated, type-safe API, allowing users to perform precise byte-level operations on file contents without ambiguity between character and byte indices.
Source/SourceKittenFramework · high confidence
Removals
Removal of Objective-C SourceKit ping utility
The Objective-C source file \main.m\ has been removed from the SourceKitten project. This file previously contained a standalone utility designed to connect to the SourceKitService via XPC and send a ping request to verify connectivity. Its removal indicates that this specific low-level connectivity test is no longer part of the codebase.
SourceKitten · high confidence
Removal of legacy Xcode project and workspace files
The SourceKitten Xcode project file (project.pbxproj) and its associated workspace configuration (contents.xcworkspacedata) have been deleted. This removes the legacy Objective-C-based build configuration that previously compiled the tool using main.m and linked against sourcekitd.framework, indicating a shift away from this specific Xcode project structure.
SourceKitten.xcodeproj · high confidence
Behavioural changes
Introduce script-based version extraction and template
Added a new Swift template file (Version.swift.template) defining a Version struct and a shell script (get-version) to extract the current version string from the source code. This change supports the fix for the version command when building with SwiftPM by providing a standardized way to retrieve the version number.
script · medium confidence
SourceKit exposed as an internal target with updated C API headers
The SourceKit library is now built as an internal target rather than a public one, restricting its direct consumption by external projects. This change introduces updated header files, including a new \sourcekitd.h\ defining the C API (version 0.4) and a module map, alongside an empty \SourceKit.c\ implementation file, effectively shifting the build and visibility configuration for this component.
Source/SourceKit · high confidence
SourceKitten CLI rewritten with swift-argument-parser and new commands
The SourceKitten command-line interface has been completely rewritten to use the swift-argument-parser library, replacing the previous Commandant-based implementation. This change introduces a new set of subcommands including \complete\ for code completion, \format\ for Swift file formatting, \index\ for file indexing, \module-info\ for module details, \request\ for raw SourceKit requests, \structure\ for AST structure, \syntax\ for syntax highlighting, and \version\. The \doc\ command now supports documenting Swift modules, Swift Package Manager modules, and Objective-C headers. The CLI also now supports reading compiler flags from SPM modules and includes options for prettifying and sorting JSON output.
Source/sourcekitten · high confidence
Updated Clang C Index headers to version 0.59
The Clang\_C module's public C headers (BuildSystem, CompilationDatabase, Documentation, Index, Platform, etc.) have been updated to version 0.59. This brings the C Index API up to date with the latest LLVM definitions, including new build system utilities (virtual file overlay, module map descriptors) and refined comment introspection types, ensuring compatibility with modern Clang tooling.
_Source/Clang\C · high confidence
Test coverage
Added test fixtures for Swift 5.9, 6.0, and 6.3; Expanded test coverage for SourceKitten framework components.
Dependencies
Initial Swift Package Manager and Ruby dependency setup
The project now uses Swift Package Manager (SPM) for dependency management, requiring Swift 5.7 and macOS 12. It explicitly declares three external dependencies: swift-argument-parser (1.3.1+), SWXMLHash (7.0.2+), and Yams (6.2.1+). Additionally, a Gemfile and Gemfile.lock are introduced to manage Ruby dependencies, specifically pinning jazzy (0.15.4) and its transitive dependencies like cocoapods (1.17.0) and activesupport (7.2.3.1).
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 69 → 64 (-5.7)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 100 → 97 (-3.0)
- Architecture 100 → 98 (-2.5)
- Maturity 65 → 65 (+0.0)
- Readiness 66 → 50 (-16.6)
- Security 63 → 78 (+14.8)
Resolved (2)
- Documentation: no licence statement (README.md)
- Off-boarding risk: anonymized user #1
New (11)
- Ambiguous constructor naming regarding initialization behavior. 'pathDeferringReading' implies a specific optimization or lazy-loading strategy that is not immediately obvious from the name alone, and it is unclear if this is a distinct semantic operation or just an implementation detail exposed to the public API. If the only difference is lazy loading, it should likely be a parameter on the main initializer or a static factory method with a clearer name like 'lazy'.
- Coverage not measured — Swift suite
- Low cohesion: String (LCOM4 11) (Source/SourceKittenFramework/CursorInfo+Parsing.swift)
- MethodTooLong: File.== (Source/SourceKittenFramework/File.swift)
- MethodTooLong: Request.sourcekitObject (Source/SourceKittenFramework/Request.swift)
- Off-boarding risk: anonymized user #1
- Outdated: swift-argument-parser
- Outdated: yams
- Request.sourcekitObject (cognitive 17) (Source/SourceKittenFramework/Request.swift)
- Request.sourcekitObject (cyclomatic 23) (Source/SourceKittenFramework/Request.swift)
- Xcode.swift.checkNewBuildSystem (cognitive 17) (Source/SourceKittenFramework/Xcode.swift)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jpsim/SourceKitten 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 1 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6ce2cf2db049d5a6b998eb777883b05f0874a2d5 — the exact code this score is about.
- Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.