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! ๐งน
- Host: GitHub
- URL: https://github.com/forward-lang/techdebt-tracker
- Owner: Forward-Lang
- License: mit
- Created: 2024-11-27T09:19:25.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-27T10:51:10.000Z (7 months ago)
- Last Synced: 2025-04-10T01:06:55.325Z (2 months ago)
- Topics: ci-cd, code-quality, code-quality-analyzer, code-quality-metrics, developer-tools, static-analysis, technical-debt
- Language: Rust
- Homepage:
- Size: 13.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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: ./srcCyclomatic 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 Metricson:
push:
branches:
- main
pull_request:
branches:
- mainjobs:
analysis:
runs-on: ubuntu-lateststeps:
- 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! โจ