Skip to content

Commit e0b549f

Browse files
authored
Merge pull request #2 from blink1073/add-pre-commit
Add pre-commit config
2 parents 1dc1ac8 + 9d18d0f commit e0b549f

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
groups:
9+
actions:
10+
patterns:
11+
- "*"

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
concurrency:
9+
group: test-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
defaults:
13+
run:
14+
shell: bash -eux {0}
15+
16+
jobs:
17+
pre_commit:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
- uses: pre-commit/[email protected]
23+
with:
24+
extra_args: --all-files --hook-stage manual

.pre-commit-config.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.4.0
5+
hooks:
6+
- id: check-added-large-files
7+
- id: check-case-conflict
8+
- id: check-yaml
9+
- id: trailing-whitespace
10+
11+
# We use the Python version instead of the original version which seems to require Docker
12+
# https://github.com/koalaman/shellcheck-precommit
13+
- repo: https://github.com/shellcheck-py/shellcheck-py
14+
rev: v0.9.0.6
15+
hooks:
16+
- id: shellcheck
17+
name: shellcheck
18+
args: ["--severity=warning"]
19+
stages: [manual]
20+
21+
- repo: https://github.com/sirosen/check-jsonschema
22+
rev: 0.28.3
23+
hooks:
24+
- id: check-github-actions
25+
files: >
26+
(?x)^(
27+
(.+/)?action\.(yml|yaml)
28+
)$
29+
- id: check-dependabot

0 commit comments

Comments
 (0)