OCA reporting engine fork for dev and update.
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.

137 lines
4.2 KiB

  1. exclude: |
  2. (?x)
  3. # NOT INSTALLABLE ADDONS
  4. # END NOT INSTALLABLE ADDONS
  5. # Files and folders generated by bots, to avoid loops
  6. ^setup/|/static/description/index\.html$|
  7. # We don't want to mess with tool-generated files
  8. .svg$|/tests/([^/]+/)?cassettes/|
  9. # Maybe reactivate this when all README files include prettier ignore tags?
  10. ^README\.md$|
  11. # Library files can have extraneous formatting (even minimized)
  12. /static/(src/)?lib/|
  13. # Repos using Sphinx to generate docs don't need prettying
  14. ^docs/_templates/.*\.html$|
  15. # You don't usually want a bot to modify your legal texts
  16. (LICENSE.*|COPYING.*)
  17. default_language_version:
  18. python: python3
  19. node: "14.13.0"
  20. repos:
  21. - repo: local
  22. hooks:
  23. # These files are most likely copier diff rejection junks; if found,
  24. # review them manually, fix the problem (if needed) and remove them
  25. - id: forbidden-files
  26. name: forbidden files
  27. entry: found forbidden files; remove them
  28. language: fail
  29. files: "\\.rej$"
  30. - repo: https://github.com/oca/maintainer-tools
  31. rev: ab1d7f6
  32. hooks:
  33. # update the NOT INSTALLABLE ADDONS section above
  34. - id: oca-update-pre-commit-excluded-addons
  35. - id: oca-fix-manifest-website
  36. args: ["https://github.com/OCA/reporting-engine"]
  37. - repo: https://github.com/myint/autoflake
  38. rev: v1.4
  39. hooks:
  40. - id: autoflake
  41. args:
  42. - --expand-star-imports
  43. - --ignore-init-module-imports
  44. - --in-place
  45. - --remove-all-unused-imports
  46. - --remove-duplicate-keys
  47. - --remove-unused-variables
  48. - repo: https://github.com/psf/black
  49. rev: 20.8b1
  50. hooks:
  51. - id: black
  52. - repo: https://github.com/pre-commit/mirrors-prettier
  53. rev: v2.1.2
  54. hooks:
  55. - id: prettier
  56. name: prettier (with plugin-xml)
  57. additional_dependencies:
  58. - "prettier@2.1.2"
  59. - "@prettier/plugin-xml@0.12.0"
  60. args:
  61. - --plugin=@prettier/plugin-xml
  62. files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
  63. - repo: https://github.com/pre-commit/mirrors-eslint
  64. rev: v7.8.1
  65. hooks:
  66. - id: eslint
  67. verbose: true
  68. args:
  69. - --color
  70. - --fix
  71. - repo: https://github.com/pre-commit/pre-commit-hooks
  72. rev: v3.2.0
  73. hooks:
  74. - id: trailing-whitespace
  75. # exclude autogenerated files
  76. exclude: /README\.rst$|\.pot?$
  77. - id: end-of-file-fixer
  78. # exclude autogenerated files
  79. exclude: /README\.rst$|\.pot?$
  80. - id: debug-statements
  81. - id: fix-encoding-pragma
  82. args: ["--remove"]
  83. - id: check-case-conflict
  84. - id: check-docstring-first
  85. - id: check-executables-have-shebangs
  86. - id: check-merge-conflict
  87. # exclude files where underlines are not distinguishable from merge conflicts
  88. exclude: /README\.rst$|^docs/.*\.rst$
  89. - id: check-symlinks
  90. - id: check-xml
  91. - id: mixed-line-ending
  92. args: ["--fix=lf"]
  93. - repo: https://github.com/asottile/pyupgrade
  94. rev: v2.7.2
  95. hooks:
  96. - id: pyupgrade
  97. args: ["--keep-percent-format"]
  98. - repo: https://github.com/PyCQA/isort
  99. rev: 5.5.1
  100. hooks:
  101. - id: isort
  102. name: isort except __init__.py
  103. args:
  104. - --settings=.
  105. exclude: /__init__\.py$
  106. - repo: https://github.com/acsone/setuptools-odoo
  107. rev: 2.6.0
  108. hooks:
  109. - id: setuptools-odoo-make-default
  110. - id: setuptools-odoo-get-requirements
  111. args:
  112. - --output
  113. - requirements.txt
  114. - --header
  115. - "# generated from manifests external_dependencies"
  116. - repo: https://gitlab.com/PyCQA/flake8
  117. rev: 3.8.3
  118. hooks:
  119. - id: flake8
  120. name: flake8
  121. additional_dependencies: ["flake8-bugbear==20.1.4"]
  122. - repo: https://github.com/PyCQA/pylint
  123. rev: pylint-2.5.3
  124. hooks:
  125. - id: pylint
  126. name: pylint with optional checks
  127. args:
  128. - --rcfile=.pylintrc
  129. - --exit-zero
  130. verbose: true
  131. additional_dependencies: &pylint_deps
  132. - pylint-odoo==3.5.0
  133. - id: pylint
  134. name: pylint with mandatory checks
  135. args:
  136. - --rcfile=.pylintrc-mandatory
  137. additional_dependencies: *pylint_deps