Remove generated files from GitHub line counts

Latest Version

Version
1.7.1
Update
October 19, 2024
Size
123KiB
Developer
Category
Users
162
Rating
5 ★
Manifest Version
3
Web Store Status
Languages Support
English (United States)
See more
Permissions
Storage
See more

GitHub: Better Line Counts Extension

Isn't it annoying when you open a small PR, but when you look at the diff, it's +2000 -16 because you installed a new library? Or what if you had to review that PR, don't line counts like that dissuade you from starting the review?

In reality, lots of code is generated nowadays and GitHub's line counts are not representative of a PR's true size.

This extension subtracts generated files from the total line counts, giving you a better idea of how big a PR really is. That's it. That's all it does.

Generated files are detected from the branch's root .gitattributes file. See GitHub's docs to learn how to mark a file as generated: https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github

For a simple example, checkout this extension's .gitattributes file! https://github.com/aklinker1/github-better-line-counts/blob/main/.gitattributes

---

The extension is open source. Feel free to contribute if you have any ideas or just star it 😀
https://github.com/aklinker1/github-better-line-counts
Read more

Source Manifest.json

{
"update_url": "https://clients2.google.com/service/update2/crx",
"manifest_version":3,
"name":"GitHub: Better Line Counts",
"description":"Remove generated files from GitHub line counts",
"version":"1.7.1",
"icons":{"16":"icon/16.png",
"32":"icon/32.png",
"48":"icon/48.png",
"96":"icon/96.png",
"128":"icon/128.png"},
"permissions":["storage"],
"background":{"service_worker":"background.js"},
"options_ui":{"open_in_tab":false,
"page":"options.html"},
"content_scripts":[{"matches":["*://*.github.com/*"],
"run_at":"document_end",
"css":["content-scripts/content.css"],
"js":["content-scripts/content.js"]}]}
Read more

Similar Extensions

icon

Github JSON Editor Extension · Productivity 162 0 ★ 517KiB

icon

HintEd Smart Manuals Editor Extension · Productivity 162 1 ★ 6.36MiB

icon

ARGOS DOM Extension · Developer Tools 162 0 ★ 67.96KiB

icon

LumoSearch: Airbnb Review Summary & Search Extension · Productivity 162 2 ★ 49.99KiB

icon

Michael's Upgrade for TrakED Extension · Productivity 162 0 ★ 410KiB

icon

Tanuki Utilities Extension · Developer Tools 162 1 ★ 25.43KiB

icon

GitHub LOC Extension · Developer Tools 162 3 ★ 733KiB

icon

Space Bubbles Shooter Extension · Fun 162 0 ★ 7.27MiB

icon

Add to Benevolist.org Button Extension · Shopping 162 0 ★ 26.28KiB

icon

Left Unread Extension · Productivity 162 4 ★ 25.15KiB

icon

Passive Aggressive Email Translator Extension Extension · Fun 162 0 ★ 143KiB

icon

Thymeline Extension · Productivity 162 1 ★ 230KiB

icon

Hive - Bookmarks Extension · Productivity 162 65 ★ 97.95KiB

icon

Agfa JIRA Extension · Productivity 162 2 ★ 22.96KiB

icon

Follows You GitHub Extension · Social & Communication 162 0 ★ 11.25KiB

icon

GitHub Minesweeper Extension · Fun 162 8 ★ 13.37KiB

icon

ChatGPT Recall Prompts Extension · Productivity 162 3 ★ 37.64KiB

icon

AuthentiSci Extension · News & Weather 162 0 ★ 160KiB

icon

TruthGPT - No Hallucinations, only Truth Extension · Productivity 162 3 ★ 2.73MiB

icon

Banner Animation Control - Dev Extension · Developer Tools 162 13 ★ 152KiB

icon

Drag GPT - Start AI Easily with Drag! Extension · Productivity 162 3 ★ 273KiB

icon

Ducking Extension - Ducking.id Extension · Productivity 162 13 ★ 1.88MiB

icon

Load Background Tabs Lazily Extension · Productivity 162 5 ★ 77.7KiB

icon

GitHub File Diff Extension · Developer Tools 162 0 ★ 354KiB

User reviews

icon

Jerry Green (ID: 000000fc98131061) Voted 5 ★ - Updated 07/16/2023 Such a neat little change to Github I wanted.