-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
51 lines (46 loc) · 1.61 KB
/
.pre-commit-config.yaml
File metadata and controls
51 lines (46 loc) · 1.61 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
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-ast # checks Python syntax
- id: check-json # checks JSON syntax
- id: check-merge-conflict # checks for no merge conflict strings
- id: check-shebang-scripts-are-executable # checks all shell scripts have executable permissions
- id: check-toml # checks TOML syntax
- id: check-yaml # checks YAML syntax
- id: end-of-file-fixer # checks there is a newline at the end of the file
- id: mixed-line-ending # normalizes line endings
- id: no-commit-to-branch # prevents committing to main
- id: trailing-whitespace # trims trailing whitespace
args: [--markdown-linebreak-ext=md, --markdown-linebreak-ext=mdx]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.2
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format
- repo: local
hooks:
- id: ruff-format-docs
name: ruff-format-docs
language: python
entry: python scripts/ruff_format_docs.py --line-length=88
files: ^docs-website/.*\.mdx$
types: [text]
additional_dependencies:
- ruff
- add-trailing-comma
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: "haystack/data/abbreviations"
args: ["--toml", "pyproject.toml"]
additional_dependencies:
- tomli
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint-docker
args: ["-ignore", "SC2102"]