The Compare command

Compare 2 git revisions against each other and see the évolution of your debt between them

debt-collector compare --revision {GIT_REV}

where GIT_REV is a hash, commit, or a branch where Git is able to checkout onto

This command is useful (and has been thought to do so) to publish Pull request reports. It's mostly designed to run in a CI environment, but you can run it from anywhere

Example :

debt-collector compare --revision main

In this case, debt-collector will compare the "Main" branch with the current head.

The compare command will first check the Main branch, then analyse Diff between the ancestor and current head. And then report for every modified files, the debt score évolution, and provide hints on how to reduce the debt further.

Optional flags :

flag
argument
description

--rule / -r

string: a rule Id

display results for one specific rule

--tags / -t

array: a list of tags

filter results by rule tags

--help

display help

--config / -c

string: path to the config file

change the default config path

Last updated