Giter Site home page Giter Site logo

lcetinsoy / tech-debt Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 19 KB

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.

License: MIT License

Python 97.51% JavaScript 1.68% Shell 0.81%
quality-control good-practices technical-debt software-craftmanship

tech-debt's Introduction

Tech-debt

A simple tool to quantify your technical debt

Installation

requirements : python 3

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 :

#@debt("implementation")
def poor_function():
    
    #@debt("implementation": "variable naming")
    bla = 2
    return bla
  1. Project configuration

Adapt the following configuration file and put it in your project folder (cf config_example.yml)

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
  1. Run
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:

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

pytest -s src/lib.py

tech-debt's People

Contributors

lcetinsoy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.