-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (60 loc) · 1.96 KB
/
.pre-commit-config.yaml
File metadata and controls
61 lines (60 loc) · 1.96 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
# SPDX-FileCopyrightText: (C) 2025, 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2025, 2026 openRuyi Project Contributors
# SPDX-FileContributor: yyjeqhc <jialin.oerv@isrc.iscas.ac.cn>
# SPDX-FileContributor: Zheng Junjie <zhengjunjie@iscas.ac.cn>
# SPDX-FileContributor: lzyprime <2383518170@qq.com>
#
# SPDX-License-Identifier: MulanPSL-2.0
repos:
- repo: local
hooks:
- id: no-group-tag
name: "check no Group tag"
language: pygrep
entry: '^Group:'
files: \.spec$
- id: autorelease
name: "check autorelease macro"
language: pygrep
entry: '^Release:.*(%autorelease|%{autorelease}).*$'
args: ["--negate"]
files: \.spec$
- id: autochangelog
name: "check autochangelog macro"
language: pygrep
entry: '%changelog\s+%autochangelog'
args: ["--negate", "--multiline"]
files: \.spec$
- id: format-spacing
name: "Check format spacing"
language: pygrep
entry: '^(((BuildOption\(.*\)|BuildRequires):(?! {2}))|(%files {2,}(?=\S)))'
args: []
files: \.spec$
- id: sourcewithRemoteAsset
name: "check Source with #!RemoteAsset"
language: python
entry: scripts/pre-commit-hooks/check_source_with_remoteasset.py
files: \.spec$
pass_filenames: true
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
files: \.spec$
- id: end-of-file-fixer
files: \.spec$
- id: check-added-large-files
- id: check-merge-conflict
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- repo: local
hooks:
- id: reuse-add-annotate
name: "Add REUSE license headers"
language: python
entry: scripts/pre-commit-hooks/reuse-add-annotate.py
files: \.spec$
pass_filenames: true
additional_dependencies: ['reuse>=6.0.0']