subhub/.pre-commit-config.yaml

107 строки
2.8 KiB
YAML

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# Available pre-commit hooks
# https://pre-commit.com/hooks.html
default_language_version:
python: python3.7
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: check-added-large-files
- id: check-json
- id: detect-private-key
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: pretty-format-json
args: [
'--autofix',
'--indent', '4',
'--no-sort-keys',
]
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v1.9.1
hooks:
- id: pylint
additional_dependencies: [pylint-venv]
args: ['--disable=all']
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.7
exclude: dodo.py
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.740
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.1.0
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
args: [
'-c', 'bandit.yml'
]
name: 'Checking vulnerabilities'
description: 'Bandit is a tool for finding common security issues in Python code'
entry: bandit
language: python
types: [python]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
hooks:
- id: insert-license
files: \.py
args:
- --license-filepath
- etc/license-header
- id: insert-license
files: \.yml
args:
- --license-filepath
- etc/license-header
- id: insert-license
files: \.txt
args:
- --license-filepath
- etc/license-header
- id: insert-license
files: \.ini
args:
- --license-filepath
- etc/license-header
- id: insert-license
files: \.tf
args:
- --license-filepath
- etc/license-header
- id: insert-license
files: \.hcl
args:
- --license-filepath
- etc/license-header
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.19.0
hooks:
- id: terraform_fmt
- id: terraform_validate
- repo: https://github.com/Yelp/detect-secrets
rev: v0.13.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']