# astral-sh/ruff SLOC report

> As of 2026-09-15 (commit 1eab8c883aa3), astral-sh/ruff contains 1,155,501 total lines: 619,747 code, 401,317 comments, 134,437 blank, across 3,796 files in 14 languages (top: Rust 91.6%). Custom configuration (tests excluded, docs excluded, generated excluded). Counted with tokei via OctoCounts.

astral-sh/ruff has 619,747 source lines of code out of 1,155,501 total lines across 3,796 files, counted from the 1eab8c883aa32324a2710c1a277bf614b86cfba3 ref at commit 1eab8c883aa3 by the OctoCounts tokei engine on 2026-09-15. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving astral-sh/ruff to commit 1eab8c883aa3, downloading the repository source archive, and counting every source file 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, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a large codebase by counted code lines. Code represents 53.6% of all lines, comments represent 34.7%, and the repository averages 163 code lines per file. Rust accounts for 91.6% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| Rust | 1,878 | 663,210 | 567,589 | 29,751 | 65,870 |
| Python | 986 | 23,214 | 18,010 | 1,797 | 3,407 |
| JSON | 22 | 17,048 | 17,040 | 0 | 8 |
| TSX | 31 | 6,534 | 5,719 | 174 | 641 |
| TOML | 129 | 5,915 | 4,976 | 239 | 700 |
| YAML | 29 | 5,060 | 4,244 | 411 | 405 |
| SVG | 17 | 1,131 | 1,024 | 71 | 36 |
| TypeScript | 18 | 756 | 561 | 104 | 91 |
| Shell | 14 | 461 | 255 | 140 | 66 |
| CSS | 2 | 252 | 222 | 0 | 30 |
| HTML | 2 | 81 | 81 | 0 | 0 |
| Dockerfile | 1 | 38 | 26 | 7 | 5 |

Top language (Rust 91.6%). Generated at 2026-09-15T09:35:03.705185510+00:00. Canonical report: https://octocounts.com/github/astral-sh/ruff

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/astral-sh/ruff/commit/1eab8c883aa32324a2710c1a277bf614b86cfba3?analysis=%7B%22ignoredDirs%22%3A%5B%5D%2C%22ignoredLanguages%22%3A%5B%5D%2C%22profile%22%3A%22default%22%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does astral-sh/ruff have?

astral-sh/ruff has 1,155,501 total lines, including 619,747 code lines, 401,317 comment lines, and 134,437 blank lines.

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

OctoCounts resolved the public GitHub repository to commit 1eab8c883aa3, 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 1eab8c883aa32324a2710c1a277bf614b86cfba3 at commit 1eab8c883aa3 on 2026-09-15T09:35:03.705185510+00:00.

## Similar repository reports

- [apache/datafusion](https://octocounts.com/github/apache/datafusion) — Rust, 631,738 code lines
- [tikv/tikv](https://octocounts.com/github/tikv/tikv) — Rust, 632,230 code lines
- [brightwave-inc/tidebreak](https://octocounts.com/github/brightwave-inc/tidebreak) — Rust, 601,204 code lines
- [Helvesec/rmux](https://octocounts.com/github/Helvesec/rmux) — Rust, 679,010 code lines
- [pnpm/pnpm](https://octocounts.com/github/pnpm/pnpm) — Rust, 550,799 code lines
- [helvesec/rmux](https://octocounts.com/github/helvesec/rmux) — Rust, 550,102 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)
- [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)
- [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)
