Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
rev: 1.7.5
hooks:
- id: bandit
args: ['-r', 'src/']
args: ['-r', 'src/', 'scripts/']
exclude: tests/

# Dependency vulnerability checking is handled by safety/Bandit in CI
Expand Down Expand Up @@ -105,6 +105,22 @@ repos:
fail_fast: false
verbose: true

# Safe logging guard: no raw f-string logging outside src/tui/
- id: safe-logging-guard
name: No raw f-string logging (use log_*_safe + safe_format)
entry: scripts/check_safe_logging.sh
language: system
files: '^src/.*\.py$'
pass_filenames: false

# Test import hygiene: no 'from src' / module-level sys.path.insert
- id: test-import-hygiene
name: Clean test imports (pcileechfwgenerator.*, no sys.path hacks)
entry: scripts/check_test_imports.sh
language: system
files: '^tests/.*\.py$'
pass_filenames: false

# Configuration for specific hooks
ci:
autofix_commit_msg: |
Expand Down
Loading
Loading