# astral-sh/ruff SLOC report

> astral-sh/ruff: 661,062 code lines at commit d3e454ea7c0a, counted with tokei-15.0.0 on 2026-11-16. Saved result f30be301ad6b5858f8ba361ce6217ba5ad65a651511db9330c37f9ea9d7c476e.

astral-sh/ruff has 661,062 source lines of code out of 1,298,134 total lines across 3,935 files, counted with tokei from the main ref at commit d3e454ea7c0a on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving astral-sh/ruff to commit d3e454ea7c0a, 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

astral-sh/ruff: 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 large codebase by counted code lines. Code represents 50.9% of all lines, comments represent 37.4%, and the repository averages 168 code lines per file. Rust accounts for 91.5% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Rust | 1,924 | 704,991 | 604,569 | 31,610 | 68,812 |
| Python | 1,013 | 26,076 | 20,173 | 2,208 | 3,695 |
| JSON | 24 | 17,201 | 17,193 | 0 | 8 |
| YAML | 37 | 6,784 | 5,839 | 456 | 489 |
| TSX | 31 | 6,549 | 5,732 | 174 | 643 |
| TOML | 132 | 6,245 | 5,278 | 253 | 714 |
| SVG | 17 | 1,131 | 1,024 | 71 | 36 |
| TypeScript | 18 | 756 | 561 | 104 | 91 |
| Shell | 14 | 459 | 255 | 138 | 66 |
| CSS | 2 | 252 | 222 | 0 | 30 |
| HTML | 3 | 125 | 125 | 0 | 0 |
| Jinja2 | 2 | 80 | 59 | 0 | 21 |
| Dockerfile | 1 | 43 | 32 | 6 | 5 |
| Markdown | 676 | 298,902 | 0 | 221,491 | 77,411 |
| Plain Text | 41 | 228,540 | 0 | 228,523 | 17 |

Top language: Rust 91.5%. Generated on November 16, 2026. Canonical report: https://octocounts.com/github/astral-sh/ruff/commit/d3e454ea7c0ac0f51077b6f7b4e88e1bf35e40a1?reportId=f30be301ad6b5858f8ba361ce6217ba5ad65a651511db9330c37f9ea9d7c476e&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/astral-sh/ruff/commit/d3e454ea7c0ac0f51077b6f7b4e88e1bf35e40a1?reportId=f30be301ad6b5858f8ba361ce6217ba5ad65a651511db9330c37f9ea9d7c476e&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 astral-sh/ruff have?

astral-sh/ruff has 661,062 lines of code, plus 485,034 comment lines and 152,038 blank lines, for 1,298,134 total lines at commit d3e454ea7c0a on November 16, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the astral-sh/ruff line count measured?

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

### What commit was counted for astral-sh/ruff?

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

## Similar repository reports

- [oxc-project/tsrs](https://octocounts.com/github/oxc-project/tsrs) — Rust, 663,409 code lines
- [jdx/mise](https://octocounts.com/github/jdx/mise) — Rust, 642,773 code lines
- [GramEditor/gram](https://octocounts.com/github/GramEditor/gram) — Rust, 642,023 code lines
- [tikv/tikv](https://octocounts.com/github/tikv/tikv) — Rust, 641,547 code lines
- [apache/datafusion](https://octocounts.com/github/apache/datafusion) — Rust, 686,037 code lines
- [samurmaykrr/zqlz](https://octocounts.com/github/samurmaykrr/zqlz) — Rust, 635,530 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)
- [Black vs Ruff](https://octocounts.com/compare/black-vs-ruff)
- [Rust vs Go](https://octocounts.com/compare/rust-vs-go)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Deno vs Node.js](https://octocounts.com/compare/deno-vs-node)
- [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)
