Skip to content

chore: add pre-commit hooks (gitleaks + linting)#22

Merged
KYBvWHxW merged 1 commit into
mainfrom
chore/add-pre-commit
Apr 29, 2026
Merged

chore: add pre-commit hooks (gitleaks + linting)#22
KYBvWHxW merged 1 commit into
mainfrom
chore/add-pre-commit

Conversation

@KYBvWHxW
Copy link
Copy Markdown
Contributor

Related Issue

Closes #21

Summary

  • Add .pre-commit-config.yaml with gitleaks secret scanning
  • Add ruff check + ruff format hooks for Python

Test Plan

  • Config matches org standard (videoDubbing-cli reference)
  • pre-commit run --all-files passes

🤖 Generated with Claude Code

Closes #21

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 29, 2026 14:23
@KYBvWHxW KYBvWHxW merged commit be28689 into main Apr 29, 2026
11 checks passed
@KYBvWHxW KYBvWHxW deleted the chore/add-pre-commit branch April 29, 2026 14:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a pre-commit configuration to enforce secret scanning and Python lint/format checks locally before commits, addressing Issue #21.

Changes:

  • Add gitleaks pre-commit hook for secret scanning.
  • Add Ruff (ruff + ruff-format) pre-commit hooks, with auto-fix enabled for linting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml
Comment on lines +10 to +11
args: [--fix]
- id: ruff-format
Copy link

Copilot AI Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pyproject.toml configures Ruff with extend-exclude (e.g., excluding install.py and scripts), but when Ruff is run via pre-commit it receives an explicit filename list, which means those excludes may be bypassed unless --force-exclude is passed. Consider adding --force-exclude to both the ruff and ruff-format hook args so pre-commit respects the project's configured excludes.

Suggested change
args: [--fix]
- id: ruff-format
args: [--fix, --force-exclude]
- id: ruff-format
args: [--force-exclude]

Copilot uses AI. Check for mistakes.
KYBvWHxW added a commit that referenced this pull request Apr 29, 2026
- test_config.py: 10 tests — load/save, env vars, defaults, error cases
- test_output.py: 7 tests — JSON output, error/success/info formatting
- test_dubbing.py: 7 tests — voice list filtering, JSON output, fields

Coverage: 30% → 37% (28 tests, all pass)

Closes #22

Co-authored-by: gss <tbag9199@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: add pre-commit hooks (gitleaks + linting)

3 participants