5 releases
0.1.4 | Oct 16, 2023 |
---|---|
0.1.3 | Sep 21, 2023 |
0.1.2 | Sep 21, 2023 |
0.1.1 | Sep 17, 2023 |
0.1.0 | Sep 15, 2023 |
#2 in #deleted
36 downloads per month
13KB
222 lines
maintenance-burden
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.
Example
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
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.
Dependencies
~6–12MB
~141K SLoC