tripleo-ci/.pre-commit-config.yaml

53 lines
1.6 KiB
YAML

---
repos:
- repo: https://github.com/python/black.git
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-black>=0.1.1
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
exclude: zuul.d/ansible-galaxy.yaml
- repo: https://gitlab.com/pycqa/flake8
rev: '3.8.4'
hooks:
- id: flake8
- repo: https://github.com/ansible/ansible-lint.git
rev: v5.1.2
hooks:
- id: ansible-lint
always_run: true
pass_filenames: false
additional_dependencies:
- ansible-core
- yamllint
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.0.0
hooks:
- id: bashate
entry: bashate --error . --ignore=E006,E040
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)