maintenance-burden

Crates.iomaintenance-burden
lib.rsmaintenance-burden
version0.1.4
sourcesrc
created_at2023-09-15 23:22:26.279776
updated_at2023-10-16 22:58:22.948859
descriptionCalculate the maintenance burden of each file in a git repository
homepage
repositoryhttps://github.com/smoelius/maintenance-burden
max_upload_size
id974003
size38,131
Samuel Moelius (smoelius)

documentation

README

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.
Commit count: 57

cargo fmt