Skip to content

Commit 20e93f8

Browse files
feat: add hook to check commit signatures
Signed-off-by: Oskar Manhart <[email protected]>
1 parent 05db409 commit 20e93f8

File tree

5 files changed

+24
-37
lines changed

5 files changed

+24
-37
lines changed

.github/workflows/auto-tag.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Release
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [main]
76

87
jobs:
98
release:
@@ -25,4 +24,3 @@ jobs:
2524
Automatic release of ${{ steps.compute_tag.outputs.next_tag }}
2625
env:
2726
GITHUB_TOKEN: ${{ github.token }}
28-

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.1.0
3+
rev: v6.0.0
44
hooks:
5-
- id: check-byte-order-marker
5+
- id: fix-byte-order-marker
66
- id: check-case-conflict
77
- id: check-merge-conflict
88
- id: check-symlinks
@@ -11,6 +11,6 @@ repos:
1111
- id: mixed-line-ending
1212
- id: trailing-whitespace
1313
- repo: https://github.com/pre-commit/pre-commit
14-
rev: v2.5.1
14+
rev: v4.3.0
1515
hooks:
1616
- id: validate_manifest

.pre-commit-hooks.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
- id: fmt
2-
name: fmt
3-
description: Format files with cargo fmt.
1+
- id: rustfmt
2+
name: Rustfmt
3+
description: Format with rustfmt
44
entry: cargo fmt
55
language: rust
66
types: [rust]
77
args: ["--"]
8+
89
- id: cargo-check
910
name: cargo check
10-
description: Check the package for errors.
11+
description: Check for compiler errors
1112
entry: cargo check
1213
language: rust
1314
types: [rust]
1415
pass_filenames: false
16+
1517
- id: clippy
16-
name: clippy
17-
description: Lint rust sources
18+
name: Clippy
19+
description: Lint with clippy
1820
entry: cargo clippy
1921
language: rust
2022
args: ["--", "-D", "warnings"]
2123
types: [rust]
2224
pass_filenames: false
25+
26+
- id: signoff
27+
name: Check signoff trailer
28+
description: Ensure all commits are signed off
29+
stages: [commit-msg]
30+
entry: >-
31+
(?im)^signed[- ]?off[- ]?by:\s*["\']?.+?["\']?\s*<[^>]+>
32+
language: pygrep

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
## Using rust tools with pre-commit
66

77
```yaml
8-
- repo: https://github.com/winapps-org/pre-commit-rust
9-
rev: master
8+
- repo: https://github.com/winapps-org/pre-commit-hooks
9+
rev: main
1010
hooks:
1111
- id: fmt
1212
- id: cargo-check
@@ -15,8 +15,8 @@
1515
## Passing arguments to rustfmt
1616
1717
```yaml
18-
- repo: https://github.com/winapps-org/pre-commit-rust
19-
rev: master
18+
- repo: https://github.com/winapps-org/pre-commit-hooks
19+
rev: main
2020
hooks:
2121
- id: fmt
2222
args: ['--verbose', '--edition', '2018', '--']

hooks.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)