# swiftlang/swift SLOC report

> swiftlang/swift: 2,299,938 code lines at commit d349aa60316b, counted with tokei-15.0.0 on 2026-11-16. Saved result 0abf5ef9f6537cdf850364f6ba7c591058c0104202334fde6060429b19f336f7.

swiftlang/swift has 2,299,938 source lines of code out of 3,336,604 total lines across 14,877 files, counted with tokei from the main ref at commit d349aa60316b on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving swiftlang/swift to commit d349aa60316b, downloading the repository source archive, and counting files selected by the effective rules with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options; an exact reproduction needs the same commit, engine version, and effective counting rules.

## Counting rules and retention

swiftlang/swift: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

Saved reports remain subject to cache cleanup and replacement. Export the JSON or text for durable citation; live repository URLs can change.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 68.9% of all lines, comments represent 20.8%, and the repository averages 155 code lines per file. C++ accounts for 39.2% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 1,301 | 1,241,484 | 900,751 | 176,443 | 164,290 |
| JSON | 21 | 521,058 | 521,057 | 0 | 1 |
| Swift | 10,619 | 660,946 | 416,989 | 173,990 | 69,967 |
| C Header | 1,501 | 524,328 | 330,006 | 118,161 | 76,161 |
| Module-Definition | 148 | 42,429 | 38,011 | 0 | 4,418 |
| Python | 228 | 49,230 | 37,406 | 4,739 | 7,085 |
| CMake | 545 | 36,720 | 27,411 | 4,614 | 4,695 |
| PowerShell | 5 | 7,046 | 6,583 | 288 | 175 |
| YAML | 14 | 5,032 | 5,032 | 0 | 0 |
| Objective-C++ | 14 | 5,259 | 3,570 | 889 | 800 |
| BASH | 10 | 3,934 | 2,992 | 481 | 461 |
| INI | 1 | 3,428 | 2,254 | 445 | 729 |
| C | 24 | 2,505 | 1,752 | 425 | 328 |
| Bitbake | 5 | 1,227 | 1,092 | 55 | 80 |
| Objective-C | 18 | 1,336 | 1,073 | 109 | 154 |
| Emacs Lisp | 4 | 1,404 | 1,013 | 236 | 155 |
| Autoconf | 24 | 1,139 | 861 | 117 | 161 |
| Vim Script | 8 | 689 | 602 | 45 | 42 |
| GNU Style Assembly | 2 | 519 | 321 | 114 | 84 |
| SIL | 53 | 463 | 272 | 145 | 46 |
| Shell | 7 | 359 | 254 | 59 | 46 |
| Batch | 4 | 198 | 130 | 31 | 37 |
| D | 3 | 133 | 102 | 12 | 19 |
| Assembly | 3 | 189 | 97 | 77 | 15 |
| Ruby | 1 | 96 | 86 | 3 | 7 |
| Makefile | 5 | 73 | 54 | 0 | 19 |
| LD Script | 4 | 53 | 49 | 0 | 4 |
| Zsh | 4 | 86 | 48 | 24 | 14 |
| ReStructuredText | 1 | 46 | 35 | 0 | 11 |
| Forge Config | 8 | 49 | 27 | 16 | 6 |
| SVG | 2 | 8 | 8 | 0 | 0 |
| Markdown | 244 | 19,042 | 0 | 13,493 | 5,549 |
| Plain Text | 46 | 206,096 | 0 | 200,651 | 5,445 |

Top language: C++ 39.2%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/swiftlang/swift/commit/d349aa60316ba26c8c523ed62dafe3c0c442a838?reportId=0abf5ef9f6537cdf850364f6ba7c591058c0104202334fde6060429b19f336f7&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/swiftlang/swift/commit/d349aa60316ba26c8c523ed62dafe3c0c442a838?reportId=0abf5ef9f6537cdf850364f6ba7c591058c0104202334fde6060429b19f336f7&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does swiftlang/swift have?

swiftlang/swift has 2,299,938 lines of code, plus 695,662 comment lines and 341,004 blank lines, for 3,336,604 total lines at commit d349aa60316b on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the swiftlang/swift line count measured?

OctoCounts resolved the public GitHub repository to commit d349aa60316b, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for swiftlang/swift?

This OctoCounts report was generated from main at commit d349aa60316b on November 16, 2026.

## Similar repository reports

- [OSGeo/gdal](https://octocounts.com/github/OSGeo/gdal) — C++, 2,173,887 code lines
- [qt/qtbase](https://octocounts.com/github/qt/qtbase) — C++, 2,461,021 code lines
- [Open-Cascade-SAS/OCCT](https://octocounts.com/github/Open-Cascade-SAS/OCCT) — C++, 2,087,180 code lines
- [microsoft/onnxruntime](https://octocounts.com/github/microsoft/onnxruntime) — C++, 2,571,676 code lines
- [ClickHouse/ClickHouse](https://octocounts.com/github/ClickHouse/ClickHouse) — C++, 2,641,612 code lines
- [ceph/ceph](https://octocounts.com/github/ceph/ceph) — C++, 1,992,291 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Swift vs Kotlin](https://octocounts.com/compare/swift-vs-kotlin)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Godot vs Bevy](https://octocounts.com/compare/godot-vs-bevy)
- [How to count lines of code in a GitHub repository](https://octocounts.com/docs/count-lines-of-code-github)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
- [All OctoCounts guides](https://octocounts.com/docs)
