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.3 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$|
  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: ["-i", "--ignore-init-module-imports"]
  42. - repo: https://github.com/psf/black
  43. rev: 20.8b1
  44. hooks:
  45. - id: black
  46. - repo: https://github.com/pre-commit/mirrors-prettier
  47. rev: v2.1.2
  48. hooks:
  49. - id: prettier
  50. name: prettier (with plugin-xml)
  51. additional_dependencies:
  52. - "prettier@2.1.2"
  53. - "@prettier/plugin-xml@0.12.0"
  54. args:
  55. - --plugin=@prettier/plugin-xml
  56. files: \.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|xml|yaml|yml)$
  57. - repo: https://github.com/pre-commit/mirrors-eslint
  58. rev: v7.8.1
  59. hooks:
  60. - id: eslint
  61. verbose: true
  62. args:
  63. - --color
  64. - --fix
  65. - repo: https://github.com/pre-commit/pre-commit-hooks
  66. rev: v3.2.0
  67. hooks:
  68. - id: trailing-whitespace
  69. # exclude autogenerated files
  70. exclude: /README\.rst$|\.pot?$
  71. - id: end-of-file-fixer
  72. # exclude autogenerated files
  73. exclude: /README\.rst$|\.pot?$
  74. - id: debug-statements
  75. - id: fix-encoding-pragma
  76. args: ["--remove"]
  77. - id: check-case-conflict
  78. - id: check-docstring-first
  79. - id: check-executables-have-shebangs
  80. - id: check-merge-conflict
  81. # exclude files where underlines are not distinguishable from merge conflicts
  82. exclude: /README\.rst$|^docs/.*\.rst$
  83. - id: check-symlinks
  84. - id: check-xml
  85. - id: mixed-line-ending
  86. args: ["--fix=lf"]
  87. - repo: https://github.com/asottile/pyupgrade
  88. rev: v2.7.2
  89. hooks:
  90. - id: pyupgrade
  91. args: ["--keep-percent-format"]
  92. - repo: https://github.com/PyCQA/isort
  93. rev: 5.5.1
  94. hooks:
  95. - id: isort
  96. name: isort except __init__.py
  97. args:
  98. - --settings=.
  99. exclude: /__init__\.py$
  100. - repo: https://github.com/acsone/setuptools-odoo
  101. rev: 2.6.0
  102. hooks:
  103. - id: setuptools-odoo-make-default
  104. - id: setuptools-odoo-get-requirements
  105. args:
  106. - --output
  107. - requirements.txt
  108. - --header
  109. - "# generated from manifests external_dependencies"
  110. - repo: https://gitlab.com/PyCQA/flake8
  111. rev: 3.8.3
  112. hooks:
  113. - id: flake8
  114. name: flake8 except __init__.py
  115. exclude: /__init__\.py$
  116. additional_dependencies: ["flake8-bugbear==20.1.4"]
  117. - id: flake8
  118. name: flake8 only __init__.py
  119. args: ["--extend-ignore=F401"] # ignore unused imports in __init__.py
  120. files: /__init__\.py$
  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