Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
83 lines (83 loc) · 2.72 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
83 lines (83 loc) · 2.72 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
repos:
# Basic file hygiene (validate and normalize), matching upstream ArcadeDB's pre-commit-hooks set.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-added-large-files
- id: detect-private-key
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-toml
- id: check-json
- id: check-xml
# Python formatting (unchanged): black + isort with the black profile.
- repo: https://github.com/psf/black
rev: 26.10.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 9.0.2
hooks:
- id: isort
args: [--profile, black]
# Python linting: ruff with its default rules (E4, E7, E9, F) at line length 88 (pyproject.toml).
# Check only - fixes land in their own commit; black and isort remain the formatters.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.4
hooks:
- id: ruff-check
# Java, XML, Markdown and JSON formatting, matching upstream ArcadeDB (printWidth 160 for
# Java/XML is set in .prettierrc.json; Markdown prose is not hard-wrapped). types_or (OR) is
# required: types (AND) of [java, xml] would match no file.
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.9.10
hooks:
- id: prettier
types_or: [java, xml, markdown, json]
additional_dependencies:
- prettier@3.9.10
- prettier-plugin-java@2.11.0
- prettier-plugin-xml
args: [--write, --list-different, --ignore-unknown]
# Shell formatting (unchanged).
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.14.1-1
hooks:
- id: shfmt
args: [-i, '4', -ci, -sr, -w]
# YAML formatting (unchanged): workflows are linted by actionlint, not reformatted (as upstream).
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args:
- --autofix
- --indent=2
exclude: ^\.github/
# Shell linting (.sh files). Runs in Docker; actionlint already runs shellcheck over workflow run: blocks.
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.11.0
hooks:
- id: shellcheck
# actionlint runs shellcheck over every run: block; per-file ignores live in .github/actionlint.yaml.
- repo: https://github.com/rhysd/actionlint
rev: v1.7.12
hooks:
- id: actionlint
# Dockerfile linting (scripts/Dockerfile.build). Runs in Docker.
- repo: https://github.com/hadolint/hadolint
rev: v2.15.1
hooks:
- id: hadolint-docker
- repo: local
hooks:
- id: no-old-package-name
name: the old package name does not come back
entry: python scripts/check_no_embedded_name.py
language: python
pass_filenames: false
always_run: true