forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
31 lines (28 loc) · 1.03 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
31 lines (28 loc) · 1.03 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
# MNN Pre-commit Hooks
# Install: pip install pre-commit && pre-commit install
# Only checks changed lines, does NOT reformat historical code.
repos:
- repo: local
hooks:
# C++ incremental format check (changed LINES only, not whole files)
# Uses git-clang-format to only check the lines you actually modified.
- id: clang-format-diff
name: clang-format (changed lines only)
language: script
entry: .pre-commit-hooks/clang-format-diff.sh
pass_filenames: false
always_run: true
# Commit message format: [Module:Type] Description
- id: check-commit-msg
name: check commit message format
language: script
entry: .pre-commit-hooks/check-commit-msg.sh
stages: [commit-msg]
always_run: true
# Prevent committing large files (>1MB)
- id: check-large-files
name: check for large files
language: script
entry: .pre-commit-hooks/check-large-files.sh
pass_filenames: false
always_run: true