5 个版本
0.1.4 | 2023 年 10 月 16 日 |
---|---|
0.1.3 | 2023 年 9 月 21 日 |
0.1.2 | 2023 年 9 月 21 日 |
0.1.1 | 2023 年 9 月 17 日 |
0.1.0 | 2023 年 9 月 15 日 |
#2 in #deleted
每月 30 次下载
13KB
222 行
maintenance-burden
计算 Git 仓库中每个文件删除的行数
此工具的目的是帮助您判断您在软件上花费时间的方式是否提供了价值。
简单来说,已删除的行不能再提供价值。此外,删除一行需要努力,例如,在决定是否删除该行时。这还需要在最初添加该行时所需的努力。因此,如果想要降低软件的维护成本,可能会审查删除行数众多的文件。
示例
在其自己的仓库上运行 maintenance-burden
产生以下输出
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.
依赖项
~5.5–8MB
~144K SLoC