forked from zilliztech/knowhere
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
47 lines (46 loc) · 1.36 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
# Pre-commit hook
# See documentation at: https://pre-commit.com/
#
# Pre-commit hook to run the sanity checks from Jenkins locally.
#
# Requirements:
# - How to configure:
# - $ pip install pre-commit
# - $ pre-commit install --hook-type pre-push
# - How to prevent running it:
# - git options: --no-verify or -n
# - $ git commit -n -m "YOUR COMMIT MESSAGE"
# - How to run it as standalone
# - $ pre-commit run
#
#
default_language_version:
python: python3.8
exclude: '^thirdparty'
fail_fast: True
repos:
# prepare-clang-tidy and clang-tidy run only in local machine, not on CI
- repo: local
hooks:
- id: prepare-clang-tidy
name: Prepare clang-tidy
entry: bash -c 'scripts/prepare_clang_tidy.sh'
language: system
types: [shell]
always_run: true
stages: [pre-push]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pocc/pre-commit-hooks
rev: master
hooks:
- id: clang-format
args: [-style=file]
- id: clang-tidy
args: ["--config-file=.clang-tidy", "-p=build/compile_commands.json"]
stages: [pre-push]