59c2c84214
It seems flake8 is no longer available in Gitlab. This change switches the source from Gitlab to Github to avoid the following failure. fatal: could not read Username for 'https://gitlab.com': No such device or address This also makes sure that functional jobs are skipped when pre commit config is changed, to avoid the failing job graph freeze when updating only .pre-commit-config.yaml. Closes-Bug: #1996668 Change-Id: I79143651e432cb4a62dafdb94c839d0d782b4f9f
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
---
|
|
repos:
|
|
- repo: https://github.com/python/black.git
|
|
rev: 22.10.0
|
|
hooks:
|
|
- id: black
|
|
language_version: python3
|
|
- repo: https://github.com/pycqa/flake8.git
|
|
rev: 5.0.4
|
|
hooks:
|
|
- id: flake8
|
|
additional_dependencies:
|
|
- flake8-black>=0.1.1
|
|
language_version: python3
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.3.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)$
|
|
- repo: https://github.com/pycqa/flake8
|
|
rev: '5.0.4'
|
|
hooks:
|
|
- id: flake8
|
|
- repo: https://github.com/ansible/ansible-lint.git
|
|
rev: v5.3.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.1.1
|
|
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)
|