forked from sqreen/PyMiniRacer
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.pre-commit-config.yaml
70 lines (70 loc) · 2.22 KB
/
.pre-commit-config.yaml
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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: hatch-fmt
name: Hatch format and lint
entry: hatch fmt # runs Ruff, which includes both linting and formatting.
language: system
types: [python]
pass_filenames: false
- id: hatch-docs-format
name: Hatch format docs
entry: hatch run docs:fmt # runs mdformat
language: system
- id: hatch-docs-build
name: Hatch build docs
entry: hatch run docs:build --strict # checks for, e.g., bad links
language: system
pass_filenames: false
- id: hatch-types-check
name: Hatch check types
entry: hatch run types:check
language: system
types: [python]
files: 'src/py_mini_racer'
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: \.(patch|md)$
- id: end-of-file-fixer
exclude: \.(patch|md)$
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.3.5
hooks:
- id: clang-format
args:
- --style=Chromium
- -i
- id: clang-tidy
args:
# Things we're disabling:
# lvmlibc-* is intended for the llvm project itself
# llvm-header-guard is likewise hard-coded for the llvm project itself
# llvm-include-order fights clang-format --style=Chromium
# fuchsia has some odd opinions, so disable it globally.
# altera-* is designed for FPGAs and gives weird performance advice.
# we aren't using Google's absl lib, so disable its suggestions.
- >-
-checks=*,
-llvmlibc-*,
-llvm-header-guard,
-llvm-include-order,
-fuchsia-*,
-altera-*,
-abseil-*
- -warnings-as-errors=*
# Interpret .h as C++:
- -extra-arg-before=-xc++
- -extra-arg=-std=c++20
- -extra-arg=-stdlib=libstdc++
- -extra-arg=-isystem
- -extra-arg=v8_workspace/v8/include
# The real build knows the sandbox is enabled but clang-tidy needs to be
# informed:
- -extra-arg=-DV8_ENABLE_SANDBOX
- -extra-arg=-DV8_COMPRESS_POINTERS