https://github.com/lcetinsoy/tech-debt
Technical debt happens when low code quality slows new developments : you have to pay time interests. TechDebt allows you to quantify and track your technical debt.
https://github.com/lcetinsoy/tech-debt
good-practices quality-control software-craftmanship technical-debt
Last synced: 5 months ago
JSON representation
Technical debt happens when low code quality slows new developments : you have to pay time interests. TechDebt allows you to quantify and track your technical debt.
- Host: GitHub
- URL: https://github.com/lcetinsoy/tech-debt
- Owner: lcetinsoy
- License: mit
- Created: 2020-06-15T22:23:14.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-16T23:08:36.000Z (about 5 years ago)
- Last Synced: 2025-09-25T05:20:50.561Z (9 months ago)
- Topics: good-practices, quality-control, software-craftmanship, technical-debt
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tech-debt
A simple tool to quantify your technical debt
## Installation
requirements : python 3
```bash
pip install techdebt
```
## Usage
1. Adding debt annotation
add debt annotations in your project files to mark technical debt:
- @debt()
- @debt("debt_type") or
- @debt("debt_type":"comment")
Let's say you have a python file with some debt :
```python
#@debt("implementation")
def poor_function():
#@debt("implementation": "variable naming")
bla = 2
return bla
```
2. Project configuration
Adapt the following configuration file and put
it in your project folder (cf config_example.yml)
```yaml
folder:
included:
- test_project/subA
- test_project/subB
excluded:
- vendor
- node_modules
- var
- web
- nbproject
- public
- .git
- __pycache__
extensions:
- .py
- .js
- .md
- .php
scores:
api: 5
implementation: 3
```
3. Run
```bash
techdebt --conf="path/to/config_file.yml" #default is "techdebt.yml"
```
## Plugins
You may want to have automatic code checkers do
some analysis and being included in the final debt score
For now phpstan is the sole plugin available
**Update : not yet working**
edit configuration with the following:
```yaml
plugin:
phpstan:
function_to_call: ""
folders:
- folder_to_analyse
scores:
-
```
## adding plugin
you need to code a file plugin with a method which
returns scores and then add it to the yarml file
## Roadmap
- adding line file of annotation
- better reporting
- tracking debt over time
- adding estimation range
## Testing
```bash
pytest -s src/lib.py
```