Tools used by OpenStack Documentation
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.
 
 
 
 

36 lines
1.3 KiB

  1. # We from the Oslo project decided to pin repos based on the
  2. # commit hash instead of the version tag to prevend arbitrary
  3. # code from running in developer's machines. To update to a
  4. # newer version, run `pre-commit autoupdate` and then replace
  5. # the newer versions with their commit hash.
  6. default_language_version:
  7. python: python3
  8. repos:
  9. - repo: https://github.com/pre-commit/pre-commit-hooks
  10. rev: ebc15addedad713c86ef18ae9632c88e187dd0af # v3.1.0
  11. hooks:
  12. - id: trailing-whitespace
  13. # Replaces or checks mixed line ending
  14. - id: mixed-line-ending
  15. args: ['--fix', 'lf']
  16. exclude: '.*\.(svg)$'
  17. # Forbid files which have a UTF-8 byte-order marker
  18. - id: check-byte-order-marker
  19. # Checks that non-binary executables have a proper shebang
  20. - id: check-executables-have-shebangs
  21. # Check for files that contain merge conflict strings.
  22. - id: check-merge-conflict
  23. # Check for debugger imports and py37+ breakpoint()
  24. # calls in python source
  25. - id: debug-statements
  26. - id: check-yaml
  27. files: .*\.(yaml|yml)$
  28. - repo: https://gitlab.com/pycqa/flake8
  29. rev: 181bb46098dddf7e2d45319ea654b4b4d58c2840 # 3.8.3
  30. hooks:
  31. - id: flake8
  32. additional_dependencies:
  33. - hacking>=3.0.1,<3.1.0