exclude: | (?x) # NOT INSTALLABLE ADDONS ^attachment_s3/| ^attachment_swift/| ^base_fileurl_field/| ^cloud_platform_exoscale/| ^cloud_platform_ovh/| ^monitoring_statsd/| ^test_base_fileurl_field/| # END NOT INSTALLABLE ADDONS # Files and folders generated by bots, to avoid loops ^setup/|/static/description/index\.html$| # We don't want to mess with tool-generated files .svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/| # Maybe reactivate this when all README files include prettier ignore tags? ^README\.md$| # Library files can have extraneous formatting (even minimized) /static/(src/)?lib/| # Repos using Sphinx to generate docs don't need prettying ^docs/_templates/.*\.html$| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) repos: # pylint - repo: https://github.com/pycqa/pylint rev: v4.0.5 hooks: - id: pylint name: pylint odoo # check only specific Odoo addons files: odoo/local-src/ types: ['file', 'python'] # to not check .csv and .conf files args: ["--rcfile=.ci/pylintrc_odoo"] additional_dependencies: [pylint-odoo==v10.0.1] # pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-yaml - id: check-symlinks - id: check-xml - id: debug-statements - id: end-of-file-fixer - id: mixed-line-ending args: ["--fix=lf"] types_or: [python, javascript, css, xml, yaml] - id: trailing-whitespace types_or: [python, javascript, css, xml, yaml] # Odoo pre-commit hooks - repo: https://github.com/OCA/odoo-pre-commit-hooks rev: v0.2.20 hooks: - id: oca-checks-odoo-module args: - --disable= xml-deprecated-tree-attribute, xml-header-wrong, xml-id-position-first, - id: oca-checks-po args: ["--fix"] # ruff (= flake8 + isort + pyupgrade) - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.15.4 hooks: - id: ruff-check args: [--fix, --show-fixes] exclude: __manifest__.py|__init__.py - id: ruff-format args: [--diff] exclude: __manifest__.py|__init__.py - id: ruff-format exclude: __manifest__.py|__init__.py # rstcheck - repo: https://github.com/rstcheck/rstcheck rev: v6.2.5 hooks: - id: rstcheck # setuptools-odoo - repo: https://github.com/acsone/setuptools-odoo rev: 3.3.2 hooks: - id: setuptools-odoo-make-default