.pre-commit-config.yaml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ---
  2. # See https://pre-commit.com for more information
  3. # See https://pre-commit.com/hooks.html for more hooks
  4. repos:
  5. - repo: https://github.com/pre-commit/pre-commit-hooks
  6. rev: v3.2.0
  7. hooks:
  8. - id: trailing-whitespace
  9. - id: end-of-file-fixer
  10. - id: check-yaml
  11. - id: check-added-large-files
  12. - id: check-merge-conflict
  13. - id: detect-private-key
  14. - id: mixed-line-ending
  15. args: ['--fix', 'lf']
  16. - id: check-json
  17. exclude: |
  18. (?x)^(
  19. service/internal/entities/testdata/.*\.json|
  20. integration-tests/tests/.*/entities/.*\.json|
  21. var/entities/.*\.json
  22. )$
  23. - id: check-case-conflict
  24. - id: detect-aws-credentials
  25. # Alternative semantic commit checker
  26. - repo: https://github.com/compilerla/conventional-pre-commit
  27. rev: v3.1.0
  28. hooks:
  29. - id: conventional-pre-commit
  30. stages: [commit-msg]
  31. args: [] # optional: list of Conventional Commits types to allow e.g. [feat, fix, ci, chore, test]
  32. - repo: local
  33. hooks:
  34. - id: service-codestyle
  35. name: service-codestyle
  36. entry: make service-codestyle
  37. language: system
  38. pass_filenames: false
  39. files: ^(service/|proto/|lang/|Makefile)
  40. - id: frontend-codestyle
  41. name: frontend-codestyle
  42. entry: make frontend-codestyle
  43. language: system
  44. pass_filenames: false
  45. files: ^(frontend/|Makefile)
  46. - id: service-unittests
  47. name: service-unittests
  48. entry: make service-unittests
  49. language: system
  50. pass_filenames: false
  51. files: ^(service/|proto/|lang/|Makefile)
  52. - id: service-build
  53. name: service-build
  54. entry: make service
  55. language: system
  56. pass_filenames: false
  57. files: ^(service/|proto/|lang/|Makefile)
  58. - id: it
  59. name: integration-tests
  60. entry: make it
  61. language: system
  62. pass_filenames: false
  63. stages: [pre-push]
  64. files: ^(service/|frontend/|integration-tests/|proto/|Makefile)