mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
ci(pre-commit): add pre-commit configuration (#13760)
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
b0d094a4de
commit
5e1e5c190a
2 changed files with 39 additions and 0 deletions
20
.github/workflows/pre_commit.yml
vendored
Normal file
20
.github/workflows/pre_commit.yml
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
name: pre_commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
SKIP: no-commit-to-branch
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3.0.0
|
||||
- uses: pre-commit/action@v2.0.3
|
19
.pre-commit-config.yaml
Normal file
19
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.1.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
exclude: >
|
||||
(?x)^(
|
||||
^test/runnable/extra-files/.*$|
|
||||
^test/compilable/extra-files/.*$|
|
||||
)$
|
||||
- id: check-merge-conflict
|
||||
- id: check-added-large-files
|
||||
- id: detect-private-key
|
||||
- id: no-commit-to-branch
|
||||
args: [--branch, master]
|
||||
- repo: https://github.com/sirosen/check-jsonschema
|
||||
rev: 0.14.0
|
||||
hooks:
|
||||
- id: check-github-workflows
|
Loading…
Add table
Add a link
Reference in a new issue