.pre-commit-config.yaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # The hook's default types, plus security for security advisory fixes (see SECURITY.md).
  32. args: [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test, security]
  33. - repo: local
  34. hooks:
  35. - id: docs-check
  36. name: docs-check
  37. entry: make docs-check
  38. language: system
  39. pass_filenames: false
  40. files: ^(docs/|service/internal/config/config\.go|Makefile)
  41. - id: service-codestyle
  42. name: service-codestyle
  43. entry: make service-codestyle
  44. language: system
  45. pass_filenames: false
  46. files: ^(service/|proto/|lang/|Makefile)
  47. - id: frontend-codestyle
  48. name: frontend-codestyle
  49. entry: make frontend-codestyle
  50. language: system
  51. pass_filenames: false
  52. files: ^(frontend/|Makefile)
  53. - id: frontend-unittests
  54. name: frontend-unittests
  55. entry: make frontend-unittests
  56. language: system
  57. pass_filenames: false
  58. files: ^(frontend/|Makefile)
  59. - id: service-unittests
  60. name: service-unittests
  61. entry: make service-unittests
  62. language: system
  63. pass_filenames: false
  64. files: ^(service/|proto/|lang/|Makefile)
  65. - id: service-build
  66. name: service-build
  67. entry: make service
  68. language: system
  69. pass_filenames: false
  70. files: ^(service/|proto/|lang/|Makefile)
  71. - id: it
  72. name: integration-tests
  73. entry: make it
  74. language: system
  75. pass_filenames: false
  76. stages: [pre-push]
  77. files: ^(service/|frontend/|integration-tests/|proto/|Makefile)