# NetHack/NetHack SLOC report

> As of 2026-11-23 (commit a5390cb285b3), NetHack/NetHack contains 553,466 total lines: 396,218 code, 106,559 comments, 50,689 blank, across 888 files in 22 languages (top language: C 80.3%). Canonical public options (tests, docs and generated files excluded). Counted with tokei via OctoCounts.

Source: [NetHack/NetHack on GitHub](https://github.com/NetHack/NetHack) · counted commit [a5390cb285b3](https://github.com/NetHack/NetHack/tree/a5390cb285b350cf65bea412e57dc9ed46677e27)

NetHack/NetHack has 396,218 source lines of code out of 553,466 total lines across 888 files, counted with tokei from the NetHack-5.0 ref at commit a5390cb285b3 on November 23, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

OctoCounts produced this report by resolving NetHack/NetHack to commit a5390cb285b3, 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

NetHack/NetHack: 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 71.6% of all lines, comments represent 19.3%, and the repository averages 446 code lines per file. C accounts for 80.3% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C | 345 | 415,686 | 318,169 | 57,712 | 39,805 |
| C Header | 252 | 51,966 | 36,260 | 9,947 | 5,759 |
| Lua | 132 | 17,591 | 14,135 | 2,323 | 1,133 |
| C++ | 28 | 18,818 | 14,043 | 2,827 | 1,948 |
| Visual Studio Project | 18 | 3,081 | 3,075 | 4 | 2 |
| R | 8 | 2,467 | 2,407 | 11 | 49 |
| Perl | 25 | 3,364 | 2,219 | 691 | 454 |
| Makefile | 6 | 2,614 | 1,698 | 444 | 472 |
| Python | 8 | 1,273 | 1,035 | 70 | 168 |
| Shell | 12 | 1,184 | 786 | 277 | 121 |
| MSBuild | 10 | 559 | 552 | 5 | 2 |
| Visual Studio Solution | 2 | 381 | 379 | 0 | 2 |

Top language: C 80.3%. Generated on November 23, 2026. Canonical report: https://octocounts.com/github/NetHack/NetHack

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/NetHack/NetHack/commit/a5390cb285b350cf65bea412e57dc9ed46677e27?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&reportId=671de57b4e4c57e938f73fe995a2f67af00d5e917ffd2330bef06ae1922be0cc).

## Report FAQ

### How many lines of code does NetHack/NetHack have?

NetHack/NetHack has 396,218 lines of code, plus 106,559 comment lines and 50,689 blank lines, for 553,466 total lines at commit a5390cb285b3 on November 23, 2026. Tests, docs and generated files are excluded under OctoCounts' canonical public options.

### How was the NetHack/NetHack line count measured?

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

### What commit was counted for NetHack/NetHack?

This OctoCounts report was generated from NetHack-5.0 at commit a5390cb285b3 on November 23, 2026.

## 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)
- [Largest codebases by programming language](https://octocounts.com/languages)
- [Neovim vs VS Code](https://octocounts.com/compare/neovim-vs-vscode)
- [MongoDB vs PostgreSQL](https://octocounts.com/compare/mongodb-vs-postgres)
- [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)
