Technical debt refers to incomplete or temporary workarounds that allow us to speed software development in the short term at the cost of paying a higher price later on. Recently, studies have shown that technical debt can be detected from source code comments, referred to as self-admitted technical debt.
$ npm install --save technical-debts
const detectTechnicalDebts = require('technical-debts');
console.log(detectTechnicalDebts('./example_packages/calculator'));
//{ files:
// { '... index.js': { debts: 0, comments: 0 },
// '... lib/addition.js': { debts: 1, comments: 2 },
// '... lib/division.js': { debts: 2, comments: 7 },
// '... lib/multiplication.js': { debts: 0, comments: 1 },
// '... lib/subtraction.js': { debts: 1, comments: 2 } },
// comments: 12,
// debts: 4,
// percentage: 0.3333333333333333 }
MIT © Suhaib Mujahid