Skip to content

Commit a04ea7c

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

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Lint Check (pre-commit)
2+
3+
permissions:
4+
contents: read
5+
6+
on: [push]
7+
8+
jobs:
9+
pre-commit:
10+
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)