Skip to content

Commit 5726e18

Browse files
Add pre-commit config
Signed-off-by: Frantisek Lachman <[email protected]>
1 parent 20ae253 commit 5726e18

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,3 @@ cython_debug/
238238
# and can be added to the global gitignore or merged into this file. For a more nuclear
239239
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
240240
#.idea/
241-

.pre-commit-config.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# HOWTO: https://pre-commit.com/#usage
2+
# pip3 install pre-commit
3+
# pre-commit install
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/mirrors-prettier
7+
rev: v3.0.3
8+
hooks:
9+
- id: prettier
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.4.0
12+
hooks:
13+
- id: check-added-large-files
14+
- id: check-merge-conflict
15+
- id: check-yaml
16+
- id: detect-private-key
17+
- id: end-of-file-fixer
18+
- id: trailing-whitespace
19+
- id: detect-aws-credentials
20+
args:
21+
- --allow-missing-credentials
22+
- id: check-ast
23+
- id: check-builtin-literals
24+
- id: check-docstring-first
25+
- id: check-executables-have-shebangs
26+
- id: check-symlinks
27+
- id: detect-private-key
28+
- id: mixed-line-ending
29+
30+
- repo: https://github.com/psf/black
31+
rev: 23.9.1
32+
hooks:
33+
- id: black
34+
- repo: https://github.com/gitleaks/gitleaks
35+
rev: v8.18.0
36+
hooks:
37+
- id: gitleaks
38+
# The hook runs 'gitleaks protect --staged' which parses output of
39+
# 'git diff --staged', i.e. always passes in pre-push/manual stage.
40+
stages: [commit]
41+
- repo: https://github.com/packit/pre-commit-hooks
42+
rev: v1.2.0
43+
hooks:
44+
- id: check-rebase
45+
args:
46+
- https://github.com/packit/tmt-plans.git
47+
stages: [manual, push]

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ script.
88
## Quick-start
99

1010
In order to import such tests, simply define a tmt plan with the content:
11+
1112
```yaml
1213
plan:
1314
import:

plans/rpminspect/main.fmf

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ prepare:
2020
- name: Get other files from repo
2121
how: shell
2222
script: >
23-
curl --silent --show-error --fail --retry 5
23+
curl --silent --show-error --fail --retry 5
2424
--output "$TMT_PLAN_DATA/viewer.html"
2525
https://raw.githubusercontent.com/rpminspect/rpminspect/main/contrib/viewer.html
2626

0 commit comments

Comments
 (0)