forked from baidu-baige/LoongForge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
32 lines (29 loc) · 987 Bytes
/
Copy path.pre-commit-config.yaml
File metadata and controls
32 lines (29 loc) · 987 Bytes
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
# Shared by local developer hooks and the license.yml workflow.
# Run locally: pre-commit run --all-files
# Install hook: pre-commit install
exclude: '^(third_party|patches)/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ['--unsafe'] # allow Hydra _target_ and custom tags
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-merge-conflict
- id: check-case-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
alias: spdx-check
name: SPDX header check
files: '\.(py|sh|cu|cpp|h)$'
exclude: '^(third_party|patches|tests/datasets)/'
args:
- --license-filepath=.license-header.txt
- --use-current-year
- --detect-license-in-X-top-lines=10
- --no-extra-eol