An open API service indexing awesome lists of open source software.

https://github.com/forward-lang/techdebt-tracker

TechDebt-Tracker ๐Ÿ”Ž Help keep your codebase clean, maintainable, and bug-free! ๐Ÿงน
https://github.com/forward-lang/techdebt-tracker

ci-cd code-quality code-quality-analyzer code-quality-metrics developer-tools static-analysis technical-debt

Last synced: 2 months ago
JSON representation

TechDebt-Tracker ๐Ÿ”Ž Help keep your codebase clean, maintainable, and bug-free! ๐Ÿงน

Awesome Lists containing this project

README

        

# **๐Ÿš€ TechDebt-Tracker** ๐Ÿš€

**TechDebt-Tracker** is a powerful command-line tool that helps developers **track and manage technical debt** in their codebases. It calculates key **code metrics** like Cyclomatic Complexity, KLOC (thousands of lines of code), and many others to help you identify **areas of your code that need attention**. Whether you're working solo or as part of a team, **TechDebt-Tracker** gives you the insights you need to maintain a **cleaner, more maintainable codebase**.

โšก **Don't let technical debt slow you down โ€“ track it, manage it, and refactor it!**

## ๐ŸŒŸ **Features** ๐ŸŒŸ

- **๐Ÿ”ข Cyclomatic Complexity**: Measures the complexity of your code and identifies the parts that might be hard to maintain or prone to errors.
- **๐Ÿ“ KLOC**: Shows the size of your codebase in thousands of lines, helping you estimate the scale of your project.
- **๐Ÿ“‰ Maintainability Index**: Provides a numeric value indicating how maintainable your code is. The higher, the better!
- **๐Ÿ” Halstead Complexity Measures**: Calculates various software metrics such as volume, difficulty, and effort based on operations in your code.
- **โš ๏ธ Risk of Errors**: Flags areas of code that are more prone to errors due to high complexity.
- **๐Ÿ“ˆ Easy Integration**: Integrate easily with CI/CD pipelines to automatically flag **code debt** and prompt for necessary refactoring.

With **TechDebt-Tracker**, you'll be able to keep your codebase **clean, maintainable**, and **error-free** for the long term! ๐Ÿ’ช

## ๐Ÿ”ง **Installation** ๐Ÿ”ง

### **Prerequisites** ๐Ÿ“‹

- [Rust](https://www.rust-lang.org/learn/get-started) installed on your system.

### **Build from Source** ๐Ÿ”จ

1. Clone the repository:
```bash
git clone https://github.com/yourusername/TechDebt-Tracker.git
cd TechDebt-Tracker
```

2. Build the project:
```bash
cargo build --release
```

3. Run the tool:
```bash
./target/release/techdebt-tracker --help
```

Alternatively, you can install **TechDebt-Tracker** directly from Cargo:

> [!NOTE]
> Not yet implemented: TODO

```bash
cargo install techdebt-tracker
```

## ๐Ÿƒโ€โ™‚๏ธ **Usage**

### **Basic Command** ๐Ÿ–ฅ๏ธ

Run the tool to analyze a specific **directory** or **file**:

```bash
techdebt-tracker
```

Where `` is the path to the **file** or **directory** you want to analyze.

### **Example** ๐Ÿ”

```bash
techdebt-tracker ./src
```

This command will analyze the `./src` directory and calculate important metrics like **Cyclomatic Complexity**, **KLOC**, and more for all files within it. ๐Ÿ“Š

### **Available Arguments** โš™๏ธ

- `path`: **Required**. The path to the source code files or directory you want to analyze.

### **Example Output** ๐Ÿ’ก

```bash
Analyzing path: ./src

Cyclomatic Complexity: 15
KLOC (thousands of lines): 2.1
Maintainability Index: 68
Halstead Volume: 1100
Halstead Difficulty: 35
Halstead Effort: 38500
Risk of Errors: High (complex code detected)
```

## ๐Ÿค– **CI/CD Integration**

**TechDebt-Tracker** is perfect for integrating into your **CI/CD pipeline** to ensure that **technical debt** is automatically tracked over time. Here's an example using **GitHub Actions**:

### **Example GitHub Actions Workflow** โš™๏ธ

```yaml
name: Analyze Code Metrics

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
analysis:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust
uses: actions/setup-rust@v1
with:
rust-version: 'stable'

# Not yet implemented: TODO
- name: Build and run TechDebt-Tracker
run: |
cargo install --path .
techdebt-tracker ./src
```

This will automatically run **TechDebt-Tracker** every time changes are pushed or a pull request is made to the `main` branch, ensuring **code quality** is always monitored. ๐Ÿš€

## ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ **Contributing**

We would **love** your help in making **TechDebt-Tracker** even better! Whether you have a bug fix, a feature idea, or just want to improve the documentation, your contributions are always welcome. ๐ŸŒŸ

### **How to Contribute** ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

1. Fork the repository ๐Ÿด
2. Create a new branch (`git checkout -b feature-name`) ๐ŸŒฑ
3. Make your changes โœ๏ธ
4. Commit your changes (`git commit -am 'Add new feature'`) ๐Ÿ“
5. Push to your branch (`git push origin feature-name`) ๐Ÿš€
6. Open a **Pull Request** to the `main` branch ๐Ÿ”„

By contributing, you're helping others build **cleaner, more maintainable code** and fostering a healthy developer ecosystem. ๐Ÿค

## ๐Ÿ“ **License**

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. โš–๏ธ

## ๐Ÿ’– **Acknowledgments**

A huge thanks to the following libraries and projects that helped make **TechDebt-Tracker** possible:

- **Clap**: For building the amazing command-line interface. ๐Ÿ–ฅ๏ธ
- **Syn**: For parsing Rust code and extracting valuable metrics. ๐Ÿ“Š

---

โœจ **TechDebt-Tracker** โ€“ Track your tech debt before it tracks you! โœจ