16794e43ae
CI / lint (pull_request) Failing after 15s
CI / typecheck (pull_request) Successful in 26s
CI / coverage (pull_request) Has been skipped
CI / security (pull_request) Successful in 18s
CI / quality (pull_request) Failing after 17s
CI / behave (3.11) (pull_request) Failing after 12s
CI / behave (3.12) (pull_request) Failing after 11s
CI / behave (3.13) (pull_request) Failing after 13s
CI / docker (pull_request) Has been skipped
CI / helm (pull_request) Has been skipped
CI / build (pull_request) Failing after 13s
The version of ruff wasn't right in .pre-commit-config.yaml
103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
# Pre-commit configuration for CleverAgents
|
|
# See https://pre-commit.com for more information
|
|
# Install: pre-commit install
|
|
# Run manually: pre-commit run --all-files
|
|
|
|
default_language_version:
|
|
python: python3.13
|
|
|
|
repos:
|
|
# ----- Branch Protection & General Checks -----
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: no-commit-to-branch
|
|
name: Prevent direct commits to master
|
|
args: ["--branch", "master"]
|
|
- id: check-yaml
|
|
name: Validate YAML syntax
|
|
- id: check-toml
|
|
name: Validate TOML syntax
|
|
- id: check-json
|
|
name: Validate JSON syntax
|
|
exclude: "^\\.vscode/"
|
|
- id: check-merge-conflict
|
|
name: Check for merge conflicts
|
|
- id: check-added-large-files
|
|
name: Prevent large file commits
|
|
args: ["--maxkb=500"]
|
|
- id: end-of-file-fixer
|
|
name: Fix end of file
|
|
- id: trailing-whitespace
|
|
name: Trim trailing whitespace
|
|
args: ["--markdown-linebreak-ext=md"]
|
|
- id: debug-statements
|
|
name: Detect debug statements (pdb, breakpoint)
|
|
|
|
# ----- Ruff: Formatting & Linting -----
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.15.0
|
|
hooks:
|
|
- id: ruff-format
|
|
name: Ruff format (auto-fix)
|
|
- id: ruff
|
|
name: Ruff lint (auto-fix safe rules)
|
|
args: ["--fix", "--exit-non-zero-on-fix"]
|
|
|
|
# ----- Bandit: Security Scanning -----
|
|
- repo: https://github.com/PyCQA/bandit
|
|
rev: 1.8.3
|
|
hooks:
|
|
- id: bandit
|
|
name: Bandit security scan
|
|
args: ["-c", "pyproject.toml", "-r", "--severity-level", "medium"]
|
|
additional_dependencies: ["bandit[toml]"]
|
|
files: "^src/"
|
|
|
|
# ----- Vulture: Dead Code Detection -----
|
|
- repo: https://github.com/jendrikseipp/vulture
|
|
rev: v2.14
|
|
hooks:
|
|
- id: vulture
|
|
name: Vulture dead code detection
|
|
args:
|
|
[
|
|
"src/cleveragents",
|
|
"vulture_whitelist.py",
|
|
"--min-confidence",
|
|
"80",
|
|
"--exclude",
|
|
"src/cleveragents/discovery",
|
|
]
|
|
pass_filenames: false
|
|
|
|
# ----- Local Hooks (use installed tools) -----
|
|
- repo: local
|
|
hooks:
|
|
# Pyright: Type Checking (runs serially, uses local installation)
|
|
- id: pyright
|
|
name: Pyright type checking
|
|
language: system
|
|
entry: pyright
|
|
types: [python]
|
|
files: "^src/"
|
|
pass_filenames: false
|
|
stages: [pre-commit]
|
|
# Semgrep: Advanced security scanning for eval/exec detection
|
|
- id: semgrep-eval-exec
|
|
name: Semgrep eval/exec detection
|
|
language: system
|
|
entry: scripts/run-semgrep.sh
|
|
types: [python]
|
|
files: "^src/"
|
|
pass_filenames: false
|
|
stages: [pre-commit]
|
|
|
|
# ----- Commit Message Linting -----
|
|
- repo: https://github.com/commitizen-tools/commitizen
|
|
rev: v4.2.2
|
|
hooks:
|
|
- id: commitizen
|
|
name: Conventional commit message check
|
|
stages: [commit-msg]
|