Skip to content

Commit e141032

Browse files
committed
Add pre-commit github action
Signed-off-by: Joe Block <[email protected]>
1 parent 76cada0 commit e141032

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/pre-commit.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: pre-commit
3+
4+
on:
5+
pull_request:
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-python@v3
15+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.4.0
5+
hooks:
6+
- id: check-merge-conflict
7+
- id: check-yaml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- id: forbid-submodules
11+
- id: mixed-line-ending
12+
- repo: https://github.com/igorshubovych/markdownlint-cli
13+
rev: v0.35.0
14+
hooks:
15+
- id: markdownlint-fix
16+
args: ["--ignore", "LICENSE.md", "--disable", "~MD013"]
17+
- repo: https://github.com/thlorenz/doctoc
18+
rev: v2.2.0
19+
hooks:
20+
- id: doctoc
21+
args: ["--update-only"]

0 commit comments

Comments
 (0)