Skip to content

Instantly share code, notes, and snippets.

@l13t
Forked from MaxymVlasov/.pre-commit-config.yaml
Created November 8, 2019 13:36
Show Gist options
  • Save l13t/cd99422fc780d881068bb6667d7c87be to your computer and use it in GitHub Desktop.
Save l13t/cd99422fc780d881068bb6667d7c87be to your computer and use it in GitHub Desktop.
repos:
#######
# ALL #
#######
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
# Git style
- id: check-added-large-files
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: forbid-new-submodules
- id: no-commit-to-branch
# Common errors
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: check-executables-have-shebangs
# Cross platform
- id: check-case-conflict
# Security
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
# Git style
- repo: https://github.com/milin/giticket
rev: '868d937'
hooks:
- id: giticket
args: ['--format={ticket}: {commit_msg}']
- repo: https://github.com/jorisroovers/gitlint
rev: v0.12.0
hooks:
- id: gitlint
# More security
- repo: https://github.com/mattlqx/pre-commit-sign
rev: v1.1.1
hooks:
- id: sign-commit
#############
# TERRAFORM #
#############
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.20.0
hooks:
- id: terraform_fmt
- id: terraform_docs
- id: terraform_validate
########
# CHEF #
########
# - repo: https://github.com/belminf/pre-commit-chef # Need installed 'gem'. sudo apt install ruby. And then fail
# rev: v0.1.1
# hooks:
# - id: cookstyle
# - id: foodcritic
# args:
# - --tags ~chef15
# - --epic-fail chef14
- repo: https://github.com/mattlqx/pre-commit-ruby
rev: v1.2.6
hooks:
- id: rubocop
- id: foodcritic
- id: rspec
- id: chef-cookbook-version
- repo: https://github.com/pre-commit/mirrors-ruby-lint # Need installed 'gem'. sudo apt install ruby
rev: v2.3.1-1
hooks:
- id: ruby-lint
##########
# PYTHON #
##########
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.6.1
hooks:
- id: reorder-python-imports
- repo: https://github.com/asottile/add-trailing-comma
rev: v1.4.1
hooks:
- id: add-trailing-comma
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v1.4.4
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.3.1
hooks:
- id: pylint
#########
# SHELL # (AND OTHER)
#########
# - repo: https://github.com/jumanjihouse/pre-commit-hooks # Also ruby, also fail
# rev: 1.11.0
# hooks:
# - id: git-check # Configure in .gitattributes
# - id: git-dirty # Configure in .gitignore
# - id: markdownlint # Configure in .mdlrc
# - id: require-ascii
# - id: script-must-have-extension
# - id: script-must-not-have-extension
# - id: shellcheck
# - id: shfmt
- repo: git://github.com/detailyang/pre-commit-shell
rev: v1.0.6
hooks:
- id: shell-lint
args: [--format=json]
- repo: https://github.com/syntaqx/git-hooks
rev: v0.0.16
hooks:
- id: forbid-binary
- id: shellcheck
- id: shfmt
- repo: https://github.com/openstack/bashate
rev: 0.6.0
hooks:
- id: bashate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment