Skip to content

Commit 2d04eab

Browse files
authored
add pre-commit-check
1 parent 6248c49 commit 2d04eab

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Lint Check (pre-commit)
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
# We have to use pull_request_target here as pull_request does not grant
8+
# enough permission for reviewdog
9+
pull_request_target:
10+
push:
11+
branches:
12+
- main
13+
14+
jobs:
15+
pre-commit:
16+
uses: bemanproject/infra-workflows/.github/workflows/[email protected]

.pre-commit-config.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0 # Use the latest stable version
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/psf/black
11+
rev: 23.9.1 # Use the latest stable version
12+
hooks:
13+
- id: black
14+
15+
- repo: https://github.com/pre-commit/mirrors-eslint
16+
rev: v8.50.0 # Use the latest stable version
17+
hooks:
18+
- id: eslint
19+
20+
- repo: https://github.com/pre-commit/mirrors-prettier
21+
rev: v3.0.0 # Use the latest stable version
22+
hooks:
23+
- id: prettier
24+
25+
- repo: https://github.com/markdownlint/markdownlint
26+
rev: v0.12.0 # Use the latest stable version
27+
hooks:
28+
- id: markdownlint
29+
30+
- repo: https://github.com/PyCQA/bandit
31+
rev: v1.7.5 # Use the latest stable version
32+
hooks:
33+
- id: bandit
34+
35+
- repo: https://github.com/bridgecrewio/checkov
36+
rev: 2.4.0 # Use the latest stable version
37+
hooks:
38+
- id: checkov
39+
40+
- repo: https://github.com/zricethezav/gitleaks
41+
rev: v8.17.0 # Use the latest stable version
42+
hooks:
43+
- id: gitleaks
44+
45+
default_stages: [commit, push]
46+
47+
exclude: |
48+
^static/.*
49+
^node_modules/.*

0 commit comments

Comments
 (0)