Appearance
Languages
This lens answers two questions at once: what is this repository written in, and where is the work going? The answers often differ, so each language gets two numbers side by side: its share of the code, and its share of the lines changed.
Its biggest limit: a language here is a file extension, and work is lines changed. A language it doesn't know lands in Other, even when that's most of your code. A deleted line counts the same as a line someone wrote with care, so "where the work is going" can also mean "what's being thrown away."
Reading the numbers
| What you see | What it means |
|---|---|
| "11% of code · 62% of changes" | The language's share of all lines in the analyzed commit, and its share of all lines changed in the analyzed period (the last 12 months by default). The first is a snapshot, the second is activity. |
| ▲, or "Rust is 11% of the code and 62% of the lines changed in this window." | The language's changes outgrow its code: its share of the changes is at least 1.8 times its share of the code, and at least 3% of all changes. It's a sign of movement, in either direction. See the Ruby example. |
| "Ruby is 0% of the code and 63% of the lines changed" | The language is gone from the analyzed commit, and removing it was work in the period. A deleted line is a changed line. |
| "53% of TypeScript is tests and fixtures, not source." | A language of at least 10% of the code, with at least 40% of its lines outside source. So the language is smaller as code than its bar suggests. |
| "4 languages in 75,500 lines" | Every row in the table. Other counts as one, and so does a language with changes but no lines left. |
| "Every language takes about its share of the work." | Neither finding above applies. It doesn't mean each language is exactly in proportion: a small language can do twice its share and stay under the 3% floor. |
| 8,100 lines changed from 5,100 lines of code | Not a mistake. Changes add up over the period: a line written and then reworked counts each time, and an edited line counts twice, once deleted and once added. |
| "(45% in source)" in a tooltip | How much of the language's changes were in files counted as source. The rest went to tests, fixtures and generated files. |
| "<0.1%" | A trace. Shares show as whole percents from 10%, one decimal below that, and "<0.1%" under that. The table always uses one decimal, so a trace shows as 0 or 0.1 there. |
| "This report predates changes by language; re-run gitrelic…" | The report has no changes by language. An older report lacks them, and re-running fixes it. It also appears when every commit in the period only touched files that aren't counted, such as lockfiles, or only renamed files without editing them. Re-running won't change that; use a longer --since. |
The table's tiers compare a language's share of the changes with its share of the code. They describe how much, and don't mean good or bad.
| Tier | Share of changes against share of code |
|---|---|
| Less work than code | Under 0.8 times |
| In step | From 0.8 to 1.25 times |
| More work than code | Over 1.25 times |
| Outgrows its code | 1.8 times or more, and at least 3% of all changes |
A small language above 1.8 times but under the 3% floor is More work than code. Large languages hit a ceiling, since no share can pass 100%: above about 56% of the code a language can't outgrow it, and above 80% it can't reach More work than code. When the report has no changes by language, every language is In step.
Four example repositories
These repositories are invented, but each result is what GitRelic reports for commits like these.
A Python pipeline being ported to Rust
Rust is 11% of the code and 62% of the lines changed in this window.
| Language | On the stage | Lines | Changed | Tier |
|---|---|---|---|---|
| Python | 84% of code · 37% of changes | 38,000 | 4,800 | Less work than code |
| Rust | 11% of code · 62% of changes ▲ | 5,100 | 8,100 | Outgrows its code |
| Markdown | 3.3% of code · 1.5% of changes | 1,500 | 200 | Less work than code |
| YAML | 0.7% of code · 0% of changes | 300 | 0 | Less work than code |
| TOML | 0.3% of code · <0.1% of changes | 126 | 6 | Less work than code |
What it means: this is the case the lens was made for. A chart of size alone would call this a Python project, which is true today and says nothing about where it's heading. Rust's 8,100 changed lines are more than its 5,100 lines of code, because new files count as they're added and again as they're reworked.
"Less work than code" doesn't mean Python is abandoned: 4,800 lines changed, and its tooltip says 75% of them were in source.
What to look at: select Rust to see where it's landing ("engine · 4,200 lines · 82%", "cli · 900 lines · 18%"), and the time strip to see when. Then run again with a shorter --since to see whether the shift is still going on.
A TypeScript app with a lot of snapshots
53% of TypeScript is tests and fixtures, not source.
| Language | On the stage | Source | Tests | Fixtures | Changed | Tier |
|---|---|---|---|---|---|---|
| TypeScript | 89% of code · 92% of changes | 18,000 | 9,000 | 11,400 | 11,000 | In step |
| CSS | 7.4% of code · 6.7% of changes | 3,200 | 0 | 0 | 800 | In step |
| JSON | 3.7% of code · 1.0% of changes | 1,590 | 0 | 0 | 120 | Less work than code |
What it means: the headline says 38,400 lines of TypeScript, but only 18,000 are application code. The tooltip adds that just 45% of TypeScript's changes were in source, so more than half of the work in this language went to tests and snapshots.
This finding doesn't say whether that's good. Snapshots are often regenerated rather than written, so 11,400 fixture lines may mean little effort, and they don't show whether the tests catch anything.
What to look at: Tests shows whether source changes ship with a test, which is the question line counts can't answer.
A Go service that replaced Ruby
Ruby is 0% of the code and 63% of the lines changed in this window.
| Language | On the stage | Lines | Changed | Tier |
|---|---|---|---|---|
| Go | 96% of code · 37% of changes | 16,000 | 18,000 | Less work than code |
| YAML | 2.4% of code · 0% of changes | 400 | 0 | Less work than code |
| Shell | 1.8% of code · 0.2% of changes | 300 | 100 | Less work than code |
| Ruby | 0% of code · 63% of changes ▲ | 0 | 31,000 | Outgrows its code |
What it means: the marked language is the one that left. Ruby's 31,000 changed lines are the deletion of all 31,000 of its lines, and the language still gets the ▲ and the accent. Go looks like it's doing less than its share, yet it was written from scratch in this period: its share of the changes is low only because the removal is so large.
What to look at: a window that starts after the removal has no Ruby row, and shows the current picture. With --since, pick a date after the deletion. Ruby has no packages to open, and the time strip shades nothing for it, because it matches only files that still exist.
A C++ library that reads as "Other"
Every language takes about its share of the work.
| Language | On the stage | Files | Lines | Changed | Tier |
|---|---|---|---|---|---|
| Other | 88% of code · 91% of changes | 16 | 66,400 | 9,400 | In step |
| C++ | 5.2% of code · 3.9% of changes | 3 | 3,900 | 400 | Less work than code |
| Python | 4.2% of code · 2.9% of changes | 2 | 3,200 | 300 | Less work than code |
| Markdown | 2.6% of code · 1.9% of changes | 1 | 2,000 | 200 | Less work than code |
What it means: this repository is almost entirely C++, and the lens can't say so. Only .cpp files count as C++. Its .cc sources and .h headers are Other, along with its CMakeLists.txt, so C++ looks like a side language and Python nearly matches it. Elsewhere the Overview's Language figure says "88%, Other."
What to look at: when Other is large, select it to see where it lives ("src · 42,000 lines · 73%", "include · 15,000 lines · 26%"). Those two don't reach 100% because the root CMakeLists.txt is in the total but in no package.
How it's measured
Every file is sorted three ways. The same sorting applies to the files in the analyzed commit and to the files changed in the period.
Share of the code reads the analyzed commit's own files, never your working copy, so uncommitted edits don't show. It counts every line, including blanks and comments, and a last line with no newline. Binary files and symlinks have 0 lines, though they still count as files.
Share of the changes adds lines inserted and deleted across the period's commits, so:
- Rewriting a line counts twice, and rewriting a 900-line file counts 1,800.
- Deleting counts. Files that no longer exist still add their changes, under the language they had.
- Bots count. A dependency bump is still lines the repository absorbed, and this lens asks where the lines went, not who moved them.
- Merge commits don't count, so an edit made only while resolving a merge is invisible.
- A renamed file counts only its edited lines. Renaming a
.jsfile to.tswith no edits adds nothing to either language, so a conversion by renaming barely shows in the changes. The file's earlier changes in the period stay under JavaScript. - A first import counts in full. In a repository younger than the period, changes are mostly its files being added, so most languages come out In step.
Which language
The language comes from the file's last extension, in any capitalization.
| Language | Extensions |
|---|---|
| TypeScript | .ts .tsx .mts .cts |
| JavaScript | .js .jsx .mjs .cjs |
| YAML | .yaml .yml |
| Shell | .sh .bash .zsh |
| GraphQL | .graphql .gql |
| One extension each | Python .py, Ruby .rb, Go .go, Rust .rs, Java .java, C# .cs, C++ .cpp, C .c, PHP .php, Swift .swift, Kotlin .kt, CSS .css, SCSS .scss, LESS .less, HTML .html, Vue .vue, Svelte .svelte, Astro .astro, JSON .json, TOML .toml, XML .xml, Markdown .md, SQL .sql |
Everything else is Other: other extensions, including .h, .cc, .hpp, .kts and .mdx, languages not on the list such as Elixir, Scala or Dart, and files with no extension, such as LICENSE, Dockerfile and dotfiles.
A snapshot takes the language of the file it snapshots, because it's that file's fixture: foo.spec.ts.snap is TypeScript. A snapshot with no extension inside its name, like foo.snap, is Other.
Which class
A file gets the first class it matches, in this order:
| Class | Matches | In the bar |
|---|---|---|
| Generated | Folders vendor/, third_party/, __generated__/. Files *.generated.*, *.pb.go, *_pb2.py, *.g.dart | Palest |
| Fixture | Folders __fixtures__/, fixtures/, fixture/, testdata/, __snapshots__/, __mocks__/. Files *.snap | Palest |
| Test | Folders __tests__/, tests/, Tests/, *.Tests/, src/test/, cypress/, and test/ or spec/ at the repository's root or a package's. Files *.test.*, *.spec.*, foo_test.go, foo_spec.rb, test_foo.py, conftest.py, FooTest.java, BarTests.cs | Paler |
| Source | Everything else | Solid |
Folder names must match exactly. A test/ or spec/ folder deeper in the tree isn't a test folder, so lib/test/helpers.js counts as source unless its file name matches, and so does a test named like foo-test.js. If your language's tests look like this, its pale segment will be small or missing whatever your coverage is.
Project files count with source. Manifests, changelogs, licenses, CI and tool configuration have no bucket here, so package.json, CHANGELOG.md and .github/workflows/ci.yml are solid. A large solid YAML or JSON bar may be plumbing. --include-fixtures doesn't change this lens: the split always shows all of them.
What's left out
These files count in no language:
- Lockfiles:
package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock,bun.lockb,Cargo.lock,Gemfile.lock,poetry.lock,uv.lock,composer.lock,go.sum. Other lockfiles do count:Pipfile.lock,Podfile.lock,pubspec.lockandmix.lockland in Other, andnpm-shrinkwrap.jsonin JSON. - Images, video, fonts and binaries:
.ico,.png,.jpg,.jpeg,.gif,.svg,.webp,.avif,.heic,.heif,.mp4,.mov,.webm,.pdf,.wasm,.woff,.woff2,.ttf,.eot. - Minified files and source maps:
.min.js,.min.css,.map. - Build and tool folders at the repository's root:
dist/,coverage/,.next/,.claude/. Only at the root: a committedpackages/app/dist/counts, as source. - A few named files:
CONTRIBUTING.md,CLAUDE.md,next-env.d.ts,vite-env.d.ts.
Packages, in the rows under a selected language, hold only source lines. A package is one of the repository's own declared workspaces, else packages/*, apps/*, libs/* or services/*, else the top-level folder. Root files and dot-folders such as .github/ aren't packages.
In the dashboard
Find this lens under Structure.
- Size against work is the picture. Each language has one row with two bars on one scale, so they compare directly. The upper bar is its share of the code: solid for source, paler for tests, palest for fixtures and generated files. The thin lower bar is its share of the changes, in the accent when it outgrows the code. The ten languages with the most lines are drawn; the rest are in the table, so a language with no lines left is drawn last and may not be drawn at all, though a finding still names it. TypeScript, JavaScript, Rust, Markdown, CSS and Svelte have their own colors in every repository. Every other language is the same neutral color, so tell them apart by name.
- Hover a row for its lines, files, the split and its changes.
- Select a language to open its packages beneath it, up to 12, and dim the rest. Their bars have their own scale, the largest package being the widest, and each label gives that package's share of the language's source. Those shares may not reach 100%, since root files count in the language but not in a package. A language past the top ten doesn't open on the stage, but its card still works.
- Select a package to open the drawn language with the most of its source in it.
- The time strip shades each week's commits that touched the selected language. It matches only files that still exist, so it can show less than the changes bar, whose count includes deleted files.
- The inspector, with nothing selected, gives the language and line counts, the findings quoted above and the five largest languages. A language's card shows its files, lines, split and changes, up to 8 packages and its activity.
- The table (
T) lists every language: files, lines, share of the code, source, tests, fixtures (generated lines included), lines changed and share of the changes. - Elsewhere: a file's card names its language. The Overview's Language figure and the portfolio's cards use this lens's numbers, largest by lines, so they can say Other or JSON.
The Repository card's Language is counted differently: the code extension with the most files, from a shorter list that leaves out markup and data, with .ts and .tsx counted separately. It can name a different language from the Overview, and the Overview's is the one that matches this page.
What it can't tell you
- What's really in a file. It reads extensions, not content. A
.jsfile holding only data is JavaScript, and.hheaders are Other whatever they contain. - How much effort went in. A regenerated file, a reformatting commit and a careful fix all count by lines. A hand-written file of boilerplate looks the same as careful code. The split lets you discount generated lines only when they're named as generated.
- Which code is well tested. A big test segment can be real coverage or copied setup, and a missing one may be your tests sitting in a folder this lens doesn't recognize. Tests looks at whether changes ship with tests.
- Direction. The ▲ marks a language getting more changes than its size suggests. It can't tell a language arriving from one leaving: check its lines, its packages and the history.
- Exact code size. Blank lines, comments and copied-in code all count.
- Anything before the period. The share of the code is always the whole analyzed commit, but changes cover only the period. Use
--sinceto widen or narrow it.