Skip to content

feat: added vulture in precommit

srilatha bandari requested to merge vulture into feature-final

What does this MR do and why?

  • Integrates Vulture (dead code detection tool) into the project using pre-commit hooks
  • Automatically scans for unused code (functions, variables, imports) before every commit
  • Configured with a minimum confidence threshold to reduce false positives
  • Excludes common directories like tests and migrations

Why:

  • Improves code quality and maintainability
  • Prevents dead/unused code from being committed
  • Helps keep the codebase clean and optimized

References


Screenshots or screen recordings

Before After
No dead code check before commit Vulture runs automatically and flags unused code before commit

How to set up and validate locally

  1. Install dependencies

    pip install vulture pre-commit
  2. Install pre-commit hooks

    pre-commit install
  3. Run pre-commit manually (optional)

    pre-commit run --all-files
  4. Make a commit

    • Vulture will automatically run and detect unused code
    • If issues are found, commit will be blocked until fixed

MR acceptance checklist

  • Code follows project conventions
  • No breaking changes introduced
  • Pre-commit hook works as expected
  • Vulture correctly detects unused code
  • Documentation updated (if required)


Merge request reports

Loading