.overcommit.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Don't complain when changing branches with different overcommit configurations.
  2. verify_signatures: false
  3. CommitMsg:
  4. ALL:
  5. enabled: false
  6. EmptyMessage:
  7. enabled: true
  8. PreCommit:
  9. ALL:
  10. enabled: false
  11. RuboCop:
  12. enabled: true
  13. on_warn: fail
  14. command: ['bundle', 'exec', 'rubocop']
  15. CoffeeLint:
  16. required_executable: 'coffeelint'
  17. install_command: 'npm install -g @coffeelint/cli'
  18. # .dev/coffeelint/rules/* not supported in YAML, specify all rules separately.
  19. flags:
  20. [
  21. '--reporter=csv',
  22. '--rules',
  23. './.dev/coffeelint/rules/detect_translatable_string.coffee',
  24. ]
  25. enabled: true
  26. on_warn: fail
  27. exclude: 'public/assets/chat/**/*'
  28. Stylelint:
  29. enabled: true
  30. required_executable: 'pnpm'
  31. command: ['pnpm', '--silent', 'lint:css:cmd']
  32. include:
  33. - '**/*.scss'
  34. - '**/*.css'
  35. - '**/*.vue'
  36. TranslationCatalogCheck:
  37. required_executable: 'rails'
  38. enabled: true
  39. env:
  40. ZAMMAD_SAFE_MODE: '1'
  41. command: ['rails', 'generate', 'zammad:translation_catalog', '--check']
  42. SettingsTypesCheck:
  43. required_executable: 'rails'
  44. enabled: true
  45. env:
  46. ZAMMAD_SAFE_MODE: '1'
  47. command: ['rails', 'generate', 'zammad:setting_types', '--check']
  48. include:
  49. - 'db/seeds/settings.rb'
  50. GraphQLAPICheck:
  51. required_executable: '.gitlab/check_graphql_api_consistency.sh'
  52. enabled: true
  53. command: ['.gitlab/check_graphql_api_consistency.sh']
  54. include:
  55. - 'app/graphql/**/*'
  56. - 'app/frontend/**/*.graphql'
  57. TypeCheck:
  58. required_executable: 'pnpm'
  59. enabled: true
  60. command: ['pnpm', 'lint:ts']
  61. exclude:
  62. - 'node_modules'
  63. - 'public'
  64. - 'vendor'
  65. include:
  66. - 'app/frontend/**/*'
  67. - '**/*.cy.ts'
  68. - '**/cypress/**/*.ts'
  69. - './vite.config.*'
  70. - './vitest.setup.ts'
  71. EsLint:
  72. required_executable: 'pnpm'
  73. enabled: true
  74. command: ['pnpm', 'lint:js:cmd']
  75. exclude:
  76. - 'app/assets/**/*'
  77. - 'public/assets/chat/**/*'
  78. - 'public/assets/form/**/*'
  79. include:
  80. - '**/*.js'
  81. - '**/*.ts'
  82. - '**/*.vue'
  83. PostCheckout:
  84. ALL:
  85. enabled: false
  86. PostCommit:
  87. ALL:
  88. enabled: false
  89. PostMerge:
  90. ALL:
  91. enabled: false
  92. PostRewrite:
  93. ALL:
  94. enabled: false
  95. PrePush:
  96. ALL:
  97. enabled: false
  98. CustomScript:
  99. enabled: true
  100. description: "Verify GraphQL introspection file is not empty."
  101. required_executable: 'bash'
  102. command: [ 'bash', '-c', 'test -s app/graphql/graphql_introspection.json' ]
  103. on_warn: fail
  104. PreRebase:
  105. ALL:
  106. enabled: false
  107. PrepareCommitMsg:
  108. ALL:
  109. enabled: false