-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
33 lines (29 loc) · 1.08 KB
/
.pre-commit-config.yaml
File metadata and controls
33 lines (29 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.4
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: agentex-ui-lint-fix
name: Agentex UI Linting
entry: bash -c 'cd agentex-ui && npx eslint --fix --no-warn-ignored --max-warnings=0 $(echo "$@" | sed "s|agentex-ui/||g")' --
language: system
files: ^agentex-ui/.*\.(ts|tsx|js|jsx)$
pass_filenames: true
- id: agentex-openapi-spec
name: Regenerate AgentEx OpenAPI spec
entry: bash -c 'cd agentex && make gen-openapi && git add openapi.yaml'
language: system
files: ^agentex/(src/.*|scripts/generate_openapi_spec\.py)$
pass_filenames: false
- id: migration-safety-lint
name: 'lint Alembic migrations for dangerous Postgres patterns'
language: system
entry: agentex/scripts/git_hooks/migration_safety_lint.sh
files: ^agentex/database/migrations/alembic/versions/.*\.py$