Ansible plugin with remote container support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
2.0 KiB

  1. ---
  2. repos:
  3. - repo: https://github.com/pre-commit/pre-commit-hooks
  4. rev: v2.1.0
  5. hooks:
  6. - id: end-of-file-fixer
  7. - id: trailing-whitespace
  8. - id: mixed-line-ending
  9. - id: check-byte-order-marker
  10. - id: check-executables-have-shebangs
  11. - id: check-merge-conflict
  12. - id: debug-statements
  13. - id: flake8
  14. entry: flake8 --ignore=E24,E121,E122,E123,E124,E126,E226,E265,E305,E402,F401,F405,E501,E704,F403,F841,W503
  15. # TODO(cloudnull): These codes were added to pass the lint check.
  16. # All of these ignore codes should be resolved in
  17. # future PRs.
  18. - id: check-yaml
  19. files: .*\.(yaml|yml)$
  20. - repo: https://github.com/adrienverge/yamllint.git
  21. rev: v1.15.0
  22. hooks:
  23. - id: yamllint
  24. files: \.(yaml|yml)$
  25. types: [file, yaml]
  26. entry: yamllint --strict -f parsable
  27. - repo: https://github.com/ansible/ansible-lint
  28. rev: v4.1.0a0
  29. hooks:
  30. - id: ansible-lint
  31. files: \.(yaml|yml)$
  32. entry: >-
  33. ansible-lint --force-color -v -x "ANSIBLE0006,ANSIBLE0007,ANSIBLE0010,ANSIBLE0012,ANSIBLE0013,ANSIBLE0016"
  34. --exclude=tripleo_ansible/roles.galaxy
  35. # TODO(cloudnull): These codes were added to pass the lint check.
  36. # Things found within roles.galaxy are external
  37. # and not something maintained here.
  38. - repo: https://github.com/openstack-dev/bashate.git
  39. rev: 0.6.0
  40. hooks:
  41. - id: bashate
  42. entry: bashate --error . --verbose --ignore=E006,E040
  43. # Run bashate check for all bash scripts
  44. # Ignores the following rules:
  45. # E006: Line longer than 79 columns (as many scripts use jinja
  46. # templating, this is very difficult)
  47. # E040: Syntax error determined using `bash -n` (as many scripts
  48. # use jinja templating, this will often fail and the syntax
  49. # error will be discovered in execution anyway)