.pre-commit-config.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. repos:
  2. - repo: local
  3. hooks:
  4. - id: check-translation-tag
  5. name: Check newline characters in <translation> tag
  6. entry: .github/workflows/helper/pre-commit/check_translation_tag.py
  7. language: script
  8. exclude: |
  9. (?x)^(
  10. src/lang/.*
  11. )$
  12. types_or:
  13. - ts
  14. - repo: https://github.com/pre-commit/pre-commit-hooks.git
  15. rev: v4.5.0
  16. hooks:
  17. - id: check-json
  18. name: Check JSON files
  19. - id: check-yaml
  20. name: Check YAML files
  21. - id: fix-byte-order-marker
  22. name: Check file encoding (UTF-8 without BOM)
  23. exclude: |
  24. (?x)^(
  25. src/base/unicodestrings.h
  26. )$
  27. - id: mixed-line-ending
  28. name: Check line ending character (LF)
  29. args: ["--fix=lf"]
  30. exclude: |
  31. (?x)^(
  32. src/webui/www/private/css/lib/.* |
  33. src/webui/www/private/scripts/lib/.* |
  34. dist/windows/license.txt |
  35. test/testdata/crlf.txt
  36. )$
  37. - id: end-of-file-fixer
  38. name: Check trailing newlines
  39. exclude: |
  40. (?x)^(
  41. configure |
  42. src/webui/www/private/css/lib/.* |
  43. src/webui/www/private/scripts/lib/.* |
  44. test/testdata/crlf.txt
  45. )$
  46. exclude_types:
  47. - svg
  48. - ts
  49. - id: trailing-whitespace
  50. name: Check trailing whitespaces
  51. exclude: |
  52. (?x)^(
  53. src/webui/www/private/css/lib/.* |
  54. src/webui/www/private/scripts/lib/.*
  55. )$
  56. exclude_types:
  57. - ts
  58. - repo: https://github.com/codespell-project/codespell.git
  59. rev: v2.2.6
  60. hooks:
  61. - id: codespell
  62. name: Check spelling (codespell)
  63. args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"]
  64. exclude: |
  65. (?x)^(
  66. .*\.desktop |
  67. .*\.qrc |
  68. build-aux/.* |
  69. Changelog |
  70. dist/windows/installer-translations/.* |
  71. m4/.* |
  72. src/base/3rdparty/.* |
  73. src/searchengine/nova3/socks.py |
  74. src/webui/www/private/lang/.* |
  75. src/webui/www/private/scripts/lib/.* |
  76. src/webui/www/public/lang/.* |
  77. src/webui/www/public/scripts/lib/.* |
  78. src/webui/www/transifex/.*
  79. )$
  80. exclude_types:
  81. - ts
  82. - repo: https://github.com/crate-ci/typos.git
  83. rev: v1.16.18
  84. hooks:
  85. - id: typos
  86. name: Check spelling (typos)
  87. args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
  88. exclude: |
  89. (?x)^(
  90. .*\.asc |
  91. .*\.desktop |
  92. .*\.qrc |
  93. \.pre-commit-config\.yaml |
  94. build-aux/.* |
  95. Changelog |
  96. configure.* |
  97. dist/windows/installer-translations/.* |
  98. m4/.* |
  99. src/base/3rdparty/.* |
  100. src/searchengine/nova3/socks.py |
  101. src/webui/www/private/lang/.* |
  102. src/webui/www/private/scripts/lib/.* |
  103. src/webui/www/public/lang/.* |
  104. src/webui/www/public/scripts/lib/.* |
  105. src/webui/www/transifex/.*
  106. )$
  107. exclude_types:
  108. - svg
  109. - ts