The Walk command

Generate an interactive graph report of your debt évolution through time and space.

debt-collector walk

The walk command require a specific configuration in order to work. See configuring for more informations

The walk command works like compare, but instead of comparing 2 revisions, it will walk throught commits in time and analyse changes in order to see the évolution of debt through time. It will generate an HTML file report under

node_modules/.cache/debt-collector/report.html

This command is designed to be run on your base branch, either triggered by a cron or when releasing new software version.

In order for the walk command to work, and depending on your configuration, make sure you have all git history on the target branch.

DO NOT ABORT EXECUTION : As Debt Collector will checkout multiple times during the execution of this command, you may find yourself in a different git state if you do not let Debt collector run the commnd until completion.

Configuration overview

More information will be provided in the configuration section of thius documentation, but here are the basics :

The typescript signature for the walk config

interface Config {
  ...
  walkConfig?: {
    gitCommand: string // a git command to be run
    parser: (gitResult: string) => string[] // a funtion parsing the result, and returning a list of revisions
    limit?: number // the maximum number of revision that should be analyzed
    report?: // see the config docs for more infos on that
  }
  ...
}

flagargumentdescription

--revlength / -n

number: the maximum number of revision to check

ex: limit to 10 commits

--config / -c

string: path to the config file

change the default config path

--help

display help for the command

Last updated