Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Update pre-commit-config and add .ansible-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abtreece committed Dec 30, 2020
1 parent 91eaa47 commit fd07926
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 12 deletions.
8 changes: 8 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exclude_paths:
- .github
- molecule_inspec/cookiecutter
warn_list: # or 'skip_list' to silence them completely │
- '204' # Lines should be no longer than 160 chars │
- '301' # Commands should not change things if nothing needs doing │
- '403' # Package installs should not use latest │
- experimental # all rules tagged as experimental
54 changes: 42 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
default_language_version:
python: python3
minimum_pre_commit_version: "1.14.0"
repos:
- repo: https://github.com/python/black.git
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v2.2.3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -15,18 +13,50 @@ repos:
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
files: .*\.(yaml|yml)$
exclude: 'cookiecutter.*'
# https://github.com/pre-commit/pre-commit-hooks/issues/273
args: ["--unsafe"]
- repo: https://github.com/psf/black.git
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8.git
rev: 3.7.8
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies:
- flake8-black
- flake8-mypy
language_version: python3
- repo: https://github.com/adrienverge/yamllint.git
- repo: https://github.com/codespell-project/codespell.git
rev: v1.16.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell
language: python
types: [text]
args: []
require_serial: false
additional_dependencies: []
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.20.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
entry: yamllint --strict -f parsable
- repo: https://github.com/ansible/ansible-lint.git
rev: v4.3.7
hooks:
- id: ansible-lint
files: \.(yaml|yml)$
exclude: '.github'
always_run: true
pass_filenames: false
# do not add file filters here as ansible-lint does not give reliable
# results when called with individual files.
# https://github.com/ansible/ansible-lint/issues/611
entry: ansible-lint --force-color -p -v

0 comments on commit fd07926

Please sign in to comment.