Skip to content

Commit

Permalink
Initialize pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ansara committed Aug 19, 2021
1 parent b599383 commit 41e2a8e
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
repos:

# Type-Checking
- repo: https://github.com/sondrelg/pep585-upgrade
rev: ab1595ee0aa8823dcda1f0bd95b2c194fcd5362b
hooks:
- id: upgrade-type-hints

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
additional_dependencies: [ types-all ]

# Security
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
hooks:
- id: bandit

- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.2.1
hooks:
- id: python-safety-dependencies-check

# Linting
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.0
hooks:
- id: absolufy-imports

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-yaml
- id: check-case-conflict
- id: end-of-file-fixer
- id: pretty-format-json
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.9.3
hooks:
- id: isort

- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
args: [ --diff, --max-line-length=88 ]

- repo: https://github.com/psf/black
rev: 21.7b0
hooks:
- id: black
args: [ --diff, --line-length=88 ]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.17.0
hooks:
- id: setup-cfg-fmt

- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs
rev: v1.1.1
hooks:
- id: htmlhint
- id: markdown-toc
- id: dockerfile_lint
args: [ --json, --verbose, --dockerfile ]

# Cloud Infrastructure
- repo: git:https://github.com/antonbabenko/pre-commit-terraform
rev: v1.50.0
hooks:
- id: terraform_fmt
- id: terraform_validate

- repo: local
hooks:
- id: checkov
name: checkov
entry: checkov --directory \{\{cookiecutter.repo_name\}\}
pass_filenames: false
language: system
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
checkov
pre-commit

0 comments on commit 41e2a8e

Please sign in to comment.