Crates.io | maintenance-burden |
lib.rs | maintenance-burden |
version | 0.1.4 |
source | src |
created_at | 2023-09-15 23:22:26.279776 |
updated_at | 2023-10-16 22:58:22.948859 |
description | Calculate the maintenance burden of each file in a git repository |
homepage | |
repository | https://github.com/smoelius/maintenance-burden |
max_upload_size | |
id | 974003 |
size | 38,131 |
Calculate the number of lines deleted for each file in a git repository
The purpose of this tool is to help you judge where you might be spending time on your software in ways that aren't providing value.
Put simply, a line that is deleted can no longer provide value. Moreover, deleting a line takes effort, e.g., in deciding whether to delete the line. This is on top of the effort required to add the line in the fist place. Hence, if one is looking to reduce their software's maintenance costs, they might scrutinize files with large numbers of deleted lines.
Running maintenance-burden
on its own repository produces the following output:
0 .github/dependabot.yml
0 .gitignore
1 .github/workflows/ci.yml
1 tests/ci.rs
2 CHANGELOG.md
5 Cargo.toml
6 tests/dogfood.rs
8 src/options.rs
30 Cargo.lock
65 README.md
104 src/main.rs
Usage: maintenance-burden [OPTIONS] [PATHS]...
Arguments:
[PATHS] Show the number of lines deleted for only the files at PATHS (the quantity
is still calculated for each file in the repository); see also --exclude
Options:
--exclude Show the number of lines deleted for all files except those at PATHS,
instead of only those at PATHS
--verbose Show the difference between the number of lines added and the current
number of lines if not equal to the number of lines deleted
-h, --help Print help
-V, --version Print version
For some files, the following two quantities may differ:
- the number of lines deleted
- the number of lines added minus the current number of lines
This can happen because of an incomplete git history, or because git reports that a
file was renamed when it was not. Passing --verbose shows the latter quantity in
parentheses next to the former when they differ.