This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
60 lines (60 loc) · 2.02 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
fail_fast: true
default_stages: [commit]
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: no-commit-to-branch
name: Checking if you can commit to this branch directly
args: [--branch, master, --branch, dev]
- id: check-added-large-files
name: Checking for large files
args: [--maxkb=1000]
- id: check-merge-conflict
name: Checking for merge conflicts
- id: check-ast
name: Checking syntax of python files
- id: debug-statements
name: Checking for debug statements
- id: check-json
name: Checking json file syntax
- id: check-toml
name: Checking toml file syntax
- id: check-xml
name: Checking xml file syntax
- id: check-yaml
name: Checking yaml file syntax
- id: pretty-format-json
name: Formatting json files
args: [--autofix, --indent=4, --no-sort-keys]
- repo: local
hooks:
- id: black
name: Running black on python files
description: 'Black: The uncompromising Python code formatter'
language: system
entry: pipenv run black
types: [python]
- id: flake8
name: Running flake8 on python files
description: 'flake8 is a command-line utility for enforcing style consistency across Python projects.'
language: system
entry: pipenv run flake8
types: [python]
- id: mypy
name: Running mypy on python files
description: 'Mypy is an optional static type checker for Python. You can add type hints (PEP 484) to your Python programs, and use mypy to type check them statically.'
entry: pipenv run mypy
language: system
types: [python]
require_serial: true
additional_dependencies: []
- id: bandit
name: Running bandit on python files
description: 'Bandit is a tool for finding common security issues in Python code'
language: system
entry: pipenv run bandit
types: [python]
args: [--exclude, tests]