|
| 1 | +exclude: | |
| 2 | + (?x) |
| 3 | + # NOT INSTALLABLE ADDONS |
| 4 | + # END NOT INSTALLABLE ADDONS |
| 5 | + # <GRAP> Do no touch encrypted files |
| 6 | + .*\.encrypted| |
| 7 | + # Files and folders generated by bots, to avoid loops |
| 8 | + ^setup/|/static/description/index\.html$| |
| 9 | + # We don't want to mess with tool-generated files |
| 10 | + .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs| |
| 11 | + # Maybe reactivate this when all README files include prettier ignore tags? |
| 12 | + ^README\.md$| |
| 13 | + # Library files can have extraneous formatting (even minimized) |
| 14 | + /static/(src/)?lib/| |
| 15 | + # Repos using Sphinx to generate docs don't need prettying |
| 16 | + ^docs/_templates/.*\.html$| |
| 17 | + # Ignore build and dist directories in addons |
| 18 | + /build/|/dist/| |
| 19 | + # Ignore test files in addons |
| 20 | + /tests/samples/.*| |
| 21 | + # You don't usually want a bot to modify your legal texts |
| 22 | + (LICENSE.*|COPYING.*) |
| 23 | +default_language_version: |
| 24 | + python: python3 |
| 25 | + node: "22.9.0" |
| 26 | +repos: |
| 27 | + - repo: local |
| 28 | + hooks: |
| 29 | + # These files are most likely copier diff rejection junks; if found, |
| 30 | + # review them manually, fix the problem (if needed) and remove them |
| 31 | + - id: forbidden-files |
| 32 | + name: forbidden files |
| 33 | + entry: found forbidden files; remove them |
| 34 | + language: fail |
| 35 | + files: "\\.rej$" |
| 36 | + - id: en-po-files |
| 37 | + name: en.po files cannot exist |
| 38 | + entry: found a en.po file |
| 39 | + language: fail |
| 40 | + files: '[a-zA-Z0-9_]*/i18n/en\.po$' |
| 41 | + - repo: https://github.com/sbidoul/whool |
| 42 | + rev: v1.3 |
| 43 | + hooks: |
| 44 | + - id: whool-init |
| 45 | + - repo: https://github.com/oca/maintainer-tools |
| 46 | + rev: b89f767503be6ab2b11e4f50a7557cb20066e667 |
| 47 | + hooks: |
| 48 | + # update the NOT INSTALLABLE ADDONS section above |
| 49 | + - id: oca-update-pre-commit-excluded-addons |
| 50 | + - id: oca-fix-manifest-website |
| 51 | + args: ["https://github.com/grap/grap-odoo-custom"] |
| 52 | + - id: oca-gen-addon-readme |
| 53 | + args: |
| 54 | + - --addons-dir=. |
| 55 | + - --branch=18.0 |
| 56 | + - --org-name=grap |
| 57 | + - --repo-name=grap-odoo-custom |
| 58 | + - --if-source-changed |
| 59 | + - --no-gen-html |
| 60 | + - --keep-source-digest |
| 61 | + - --convert-fragments-to-markdown |
| 62 | + - id: oca-gen-external-dependencies |
| 63 | + - repo: https://github.com/OCA/odoo-pre-commit-hooks |
| 64 | + rev: v0.0.33 |
| 65 | + hooks: |
| 66 | + - id: oca-checks-odoo-module |
| 67 | + - id: oca-checks-po |
| 68 | + args: |
| 69 | + - --disable=po-pretty-format |
| 70 | + - repo: local |
| 71 | + hooks: |
| 72 | + - id: eslint |
| 73 | + name: eslint |
| 74 | + entry: eslint |
| 75 | + args: |
| 76 | + - --color |
| 77 | + - --fix |
| 78 | + verbose: true |
| 79 | + types: [javascript] |
| 80 | + language: node |
| 81 | + additional_dependencies: |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 86 | + rev: v4.6.0 |
| 87 | + hooks: |
| 88 | + - id: trailing-whitespace |
| 89 | + # exclude autogenerated files |
| 90 | + exclude: /README\.rst$|\.pot?$ |
| 91 | + - id: end-of-file-fixer |
| 92 | + # exclude autogenerated files |
| 93 | + exclude: /README\.rst$|\.pot?$ |
| 94 | + - id: debug-statements |
| 95 | + - id: fix-encoding-pragma |
| 96 | + args: ["--remove"] |
| 97 | + - id: check-case-conflict |
| 98 | + - id: check-docstring-first |
| 99 | + - id: check-executables-have-shebangs |
| 100 | + - id: check-merge-conflict |
| 101 | + # exclude files where underlines are not distinguishable from merge conflicts |
| 102 | + exclude: /README\.rst$|^docs/.*\.rst$ |
| 103 | + - id: check-symlinks |
| 104 | + - id: check-xml |
| 105 | + - id: mixed-line-ending |
| 106 | + args: ["--fix=lf"] |
| 107 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 108 | + rev: v0.6.8 |
| 109 | + hooks: |
| 110 | + - id: ruff |
| 111 | + args: [--fix, --exit-non-zero-on-fix] |
| 112 | + - id: ruff-format |
| 113 | + - repo: https://github.com/OCA/pylint-odoo |
| 114 | + rev: v9.1.3 |
| 115 | + hooks: |
| 116 | + - id: pylint_odoo |
| 117 | + name: pylint with optional checks |
| 118 | + args: |
| 119 | + - --rcfile=.pylintrc |
| 120 | + - --exit-zero |
| 121 | + verbose: true |
| 122 | + - id: pylint_odoo |
| 123 | + args: |
| 124 | + - --rcfile=.pylintrc-mandatory |
| 125 | + - repo: https://github.com/jackdewinter/pymarkdown |
| 126 | + rev: v0.9.32 |
| 127 | + hooks: |
| 128 | + - id: pymarkdown |
0 commit comments