First install and run
How to install and run your first analysis
Requirements
having node-js installed (tested with node 16 and 18 but probably working fine with other versions)
Install Debt-collector in your project
As long as debt-collector is an alpha
version, we recommend you to lock the package version number. Breaking changes (including bugs or api changes) may occur without warnings.
As Debt-collector is not messing with your production code, it's pretty safe to use even as an Alpha version though.
Long story short : Use it but lock the version ! 🥰
Create a configuration file
Create a configuration file named debt-collector.config.js
in your project's root directory
then add the following content :
What we've done here :
defined that debt-collector should track all files contained in the
src
directorycreated two file rules :
the first one will monitor for every occurences of "foo" in every files and increment your debt score of 3 points for every occurences
the second will count all css files, and increment your debt score of 5 points for every matches
Add a script to your package.json
Let’s try it :
Open your command line and run :
That's it, you've installed debt-collector and created your first rules. But debt-collector is a lot more than a glorified search engine.
Last updated