Skip to content

Instantly share code, notes, and snippets.

@ammarnajjar
Last active October 23, 2019 06:54
Show Gist options
  • Save ammarnajjar/10a3e91ed83b12bf35e5d76b29dbd3a9 to your computer and use it in GitHub Desktop.
Save ammarnajjar/10a3e91ed83b12bf35e5d76b29dbd3a9 to your computer and use it in GitHub Desktop.
A collection of pre-commit hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: check-toml
- id: check-xml
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- id: check-added-large-files
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.8
hooks:
- id: flake8
args: ['--max-line-length=99', '--ignore=E221,E241']
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.4
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit
rev: v1.18.3
hooks:
- id: validate_manifest
- repo: https://github.com/asottile/pyupgrade
rev: v1.25.1
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.8.0
hooks:
- id: reorder-python-imports
language_version: python3
- repo: https://github.com/asottile/add-trailing-comma
rev: v1.4.1
hooks:
- id: add-trailing-comma
- repo: https://github.com/prettier/prettier
rev: 1.18.2
hooks:
- id: prettier
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.1.1a0
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
- repo: https://github.com/psf/black
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/bandit
rev: 1.6.2
hooks:
- id: bandit
language_version: python3
exclude: ^tests/
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.740
hooks:
- id: mypy
language_version: python3
- id: validate_manifest
name: Validate Pre-Commit Manifest
description: This validator validates a pre-commit hooks manifest file
entry: pre-commit-validate-manifest
language: python
files: ^(\.pre-commit-hooks\.yaml|hooks\.yaml)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment