-
-
Notifications
You must be signed in to change notification settings - Fork 140
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
67 lines (57 loc) · 1.77 KB
/
.pre-commit-config.yaml
File metadata and controls
67 lines (57 loc) · 1.77 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
exclude: 'node_modules|.git'
default_stages: [pre-commit]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
files: "frappe_assistant_core.*"
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg"
- id: check-merge-conflict
- id: check-ast
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
hooks:
- id: ruff
name: "Run ruff import sorter"
args: ["--select=I", "--fix"]
- id: ruff
name: "Run ruff linter"
args: ["--ignore=F403"]
- id: ruff-format
name: "Run ruff formatter"
# Frappe semgrep rules — same configs the CI 'Linters' workflow uses
# (.github/workflows/linter.yml). Runs only on changed Python files.
# The wrapper script clones frappe/semgrep-rules into ~/.cache the first
# time and refreshes it weekly.
- repo: local
hooks:
- id: frappe-semgrep
name: "Run Frappe semgrep rules"
entry: scripts/run_frappe_semgrep.sh
language: python
additional_dependencies: ["semgrep==1.159.0"]
types: [python]
require_serial: true
# Prettier disabled - no JavaScript/CSS files in this project
# - repo: https://github.com/pre-commit/mirrors-prettier
# rev: v2.7.1
# hooks:
# - id: prettier
# types_or: [javascript, vue, scss]
# ESLint disabled - no JavaScript files in this project
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: v8.44.0
# hooks:
# - id: eslint
# types_or: [javascript]
# args: ['--quiet']
ci:
autoupdate_schedule: weekly
skip: []
submodules: false