This repository has been archived by the owner on Sep 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.pre-commit-config.yaml
78 lines (74 loc) · 2.31 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
# Secrets detection
- id: detect-secrets
name: detect-secrets — secrets detection
entry: detect-secrets-hook
language: system
args: ["--baseline", ".secrets.baseline"]
# Python code formatting, typing, linting, and vulnerability checks
- id: black
name: black — Python code formatter (auto-fix)
entry: black
language: system
types: [python]
require_serial: true
- id: flake8
name: flake8 — PEP8 linter
entry: flake8
language: system
types: [python]
require_serial: true
- id: isort
name: isort — sort Python imports (auto-fix)
entry: isort
language: system
types: [python]
require_serial: true
- id: mypy
name: mypy — static Python typing
entry: mypy
language: system
types: [python]
args: ["--ignore-missing-imports", "--scripts-are-modules"]
require_serial: true
- id: safety
name: safety — check for security vulnerabilities in Python packages
entry: safety check
language: system
pass_filenames: false
args: ["--bare"]
# General code formatting
- id: end-of-file-fixer
name: Fix blank lines at end of files (auto-fix)
entry: end-of-file-fixer
language: system
- id: trailing-whitespace
name: Trim trailing whitespace
entry: trailing-whitespace-fixer
language: system
# Other checks
- id: check-added-large-files
name: Check for added large files (500+ kb)
entry: check-added-large-files
language: system
- id: check-toml
name: Check TOML files syntax
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: Check YAML files syntax
entry: check-yaml
language: system
types: [yaml]
# Code formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: prettier — code formatting for various languages (auto-fix)
exclude: "^templates/cron\\.html$"