odoo-pre-commit-hooks to use in pre-commit-config.yml files
Project description
odoo-pre-commit-hooks
OCA's custom pre-commit hooks for Odoo modules
Installation
You don't need to install it directly only configure your ".pre-commit-config.yaml" file
You even can install it directly:
-
Installing from pypi:
pip install -U oca-odoo-pre-commit-hooks
-
Installing from github:
pip install --force-reinstall -U git+https://github.com/OCA/odoo-pre-commit-hooks.git@main
Usage pre-commit-config.yaml
Add to your ".pre-commit-config.yaml" configuration file the following input
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: v0.2.20
hooks:
- id: oca-checks-odoo-module
- id: oca-checks-po
args: ["--fix"]
Usage directly the entry points
If you install directly the package use the entry point:
oca-checks-odoo-module --help
oca-checks-po --help
Skip one xml-check for only one file
If you need to skip one check in one particular XML file you can use the follow comment
<?xml version="1.0" encoding="utf-8"?>
<!-- oca-hooks:disable=xml-check-to-skip -->
<odoo>
...
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<!-- oca-hooks:disable=xml-check-to-skip,
xml-check-to-skip2 -->
<odoo>
...
</odoo>
The position of the comment it is not relative to the line that throw the check
It disable the entire file
Configuration
Behavior can be configured through several methods and as of now only consists of enabling/disabling checks.
Enabling or Disabling Checks
Each available hook consists of multiple checks which can be enabled/disabled using any of the following methods (ordered by priority):
- As an argument e.g.,
oca-checks-odoo --enable=check-to-enable --disable=check-to-disable1,check-to-disable2 - Using environment variables
OCA_HOOKS_ENABLEorOCA_HOOKS_DISABLEe.g.,export OCA_HOOKS_ENABLE=check1,check2 - A configuration file. The path to it can be specified with the argument
--config. Alternatively a file named.oca_hooks.cfgwill be looked for (by default) in the following locations (in order):- Current working directory
- Repo's root
- User's home
Using a Configuration File
To enable or disable checks using a configuration file, add a disable or enable key under the MESSAGES_CONTROL section.
For example:
[MESSAGES_CONTROL]
enable=check-enable1,check-enable2
disable=check-to-disable
As stated before, each source has a certain priority. This means that if the environment variable OCA_HOOKS_ENABLE=check1
exists, the configuration file above would not have any effect when it comes to enabling checks, and the only enabled
check will be check1.
However, if OCA_HOOKS_DISABLE is not set, the configuration file will still have an effect and check-to-disable will
be disabled.
Checks
-
Check weblate-component-too-long Check if the component is too long Weblate have 100 characters limit for repository name + Odoo Version + module name e.g. The following module: https://github.com/OCA/account-financial-reporting/tree/18.0/account_tax_balance Generates the following component: account-financial-reporting-18.0-account_tax_balance
-
Check file-not-used Check if there is a file created but not referenced from manifest.py
-
Check manifest-syntax-error Check if the manifest file has syntax error
-
Check prefer-readme-rst Check if the module has README.md file to prefer README.rst file
-
Check use-header-comments Check if the py file has comments '# comment' only in the header of python files Except valid comments e.g. pylint, flake8, shebang or comments in the middle (not header)
-
Check csv-duplicate-record-id duplicate CSV "id" AKA xmlid but for CSV files
-
Check csv-syntax-error Check syntax error for CSV files declared in the manifest
-
Check xml-deprecated-data-node Deprecated node inside xml node
-
Check xml-deprecated-oe-chatter
Odoo 18 introduced a new XML tag <chatter/> which replaces the old way to declare
chatters on form views. For more information, see:
https://github.com/odoo/odoo/pull/156463
-
Check xml-deprecated-openerp-node deprecated xml node
-
Check xml-deprecated-qweb-directive for use of deprecated QWeb directives t-*-options
-
Check xml-deprecated-qweb-directive-15 t-esc and t-raw directives are deprecated in Odoo v15.0, use t-out instead. For more details https://github.com/odoo/odoo/commit/01875541b1a8131cb and https://github.com/odoo/odoo/pull/70004
-
Check xml-double-quotes-py Detect XML attributes containing escaped double quotes " -> (") for python expressions Python expressions (e.g. domain, context, eval, t-* or data-* attrs). that originate from Prettier auto-fix and reduce human readability.
When Prettier rewrites values like attr='""' into attr="""" the result is valid XML but harder to read and maintain.
The check:
- Scans XML files that contain escaped double quotes (")
- Restricts analysis to attributes known to embed Python code
- Verifies that both the original and the proposed value are valid Python expressions
- Suggests replacing double quotes with single quotes when safe
This avoids false positives and prevents introducing syntax errors while improving readability and Prettier compatibility.
-
Check xml-header-missing Generated when the XML file is missing the XML declaration header ''
-
Check xml-header-wrong Generated when the XML file declaration header is different than expected (case sensitive).
-
Check xml-not-valid-char-link The resource in in src/href contains a not valid character.
-
Check xml-oe-structure-missing-id
Ensure all tags with class 'oe_structure' have an ID. For more information on the rationale, see: https://github.com/OCA/odoo-pre-commit-hooks/issues/27
- Check xml-redundant-module-name
If the module is called "module_a" and the xmlid is
<record id="module_a.xmlid_name1" ...
The "module_a." is redundant it could be replaced to only
<record id="xmlid_name1" ...
- Check xml-id-position-first
If the record id is not in the first position
<record ... id="xmlid_name1"
It should be the first
<record id="xmlid_name1" ...
- Check xml-field-bool-without-eval
if the record is boolean but without eval attribute
<field name="active">True</field>
instead of
<field name="active" eval="True" />
- Check xml-field-numeric-without-eval
if the record is integer but without eval attribute
<field name="sequence">100</field>
instead of
<field name="sequence" eval="100" />
-
Check xml-create-user-wo-reset-password records of user without
context="{'no_reset_password': True}"This context avoid send email and mail log warning -
Check xml-view-dangerous-replace-low-priority in ir.ui.view
... -
Check xml-deprecated-tree-attribute The tree-view declaration is using a deprecated attribute.
-
Check xml-record-missing-id Generated when a tag has no id.
-
Check xml-duplicate-record-id
If a module has duplicated record_id AKA xml_ids file1.xml <record id="xmlid_name1" file2.xml <record id="xmlid_name1"
-
Check xml-duplicate-fields in all record nodes <record id="xmlid_name1"... <field name="field_name1"... <field name="field_name1"...
-
Check xml-syntax-error Check syntax of XML files declared in the Odoo manifest
-
Check xml-dangerous-qweb-replace-low-priority Dangerous qweb view defined with low priority
-
Check xml-duplicate-template-id Triggered when two templates share the same ID
-
Check xml-template-prettier-incompatible Indentify nodes incompatible with Prettier XML auto-fix generating possible unexpected text insertion
-
Check xml-xpath-translatable-item check
xpathnodes usingcontains(text(), 'Text translatable')Since that the text could be translated so it is a mutable value. It could raiseValueErrorexception if the language is changed.
** Special fixit checks
-
Check field-string-redundant Detects and removes the 'string' parameter in odoo.fields if it is redundant (matches the field name in Title Case), ensuring it only applies to Odoo Class definitions (Models).
-
Check manifest-superfluous-key Identifies and removes Identifies from Odoo manifest files (manifest.py) superfluous keys (if they have the same as the default value) should be omitted for simplicity
e.g. 'installable': True
True is the default value for installable key
e.g. 'data': []
[] is the default value for 'data' key
-
Check prefer-env-translation Replace
_('text')withself.env._('text')only if '' comes from 'odoo.' and only for modules >=18.0 -
Check unused-logger Disallow unused
_logger = logging.getLogger(__name__)in Odoo models.
Checks PO
-
Check po-requires-module Translation entry requires comment
#. module: MODULE -
Check po-python-parse-printf Check if
msgidis usingstrvariables like%sSo translationmsgstrmust be the same number of variables too -
Check po-python-parse-format Check if
msgidis usingstrvariables like{}So translationmsgstrmust be the same number of variables too -
Check po-duplicate-message-definition (message-id) in all entries of PO files
-
Check po-duplicate-model-definition Verify that no entries share the same 'model:' tag
-
Check po-pretty-format Check the following:
- Entries sorted alphabetically
- Lines are wrapped at 78 columns (same as Odoo)
- Clear msgstr when it is the same as msgid
- Check po-syntax-error Check syntax of PO files from i18n* folders
Help
usage: oca-checks-odoo-module [-h] [--no-verbose] [--no-exit] [--disable DISABLE] [--enable ENABLE] [--config CONFIG] [--list-msgs] [--fix] [files_or_modules ...]
positional arguments:
files_or_modules Odoo __manifest__.py paths or Odoo module paths.
options:
-h, --help show this help message and exit
--no-verbose If enabled so disable verbose mode.
--no-exit If enabled so it will not call exit.
--disable, -d DISABLE Disable the checker with the given 'check-name', separated by commas.
--enable, -e ENABLE Enable the checker with the given 'check-name', separated by commas. Default: All checks are enabled by default
--config, -c CONFIG Path to a configuration file (default: .oca_hooks.cfg)
--list-msgs List all currently enabled messages.
--fix Automatically fix files when possible
Help PO
usage: oca-checks-po [-h] [--no-verbose] [--no-exit] [--disable DISABLE] [--enable ENABLE] [--config CONFIG] [--list-msgs] [--fix] [po_files ...]
positional arguments:
po_files PO files.
options:
-h, --help show this help message and exit
--no-verbose If enabled so disable verbose mode.
--no-exit If enabled so it will not call exit.
--disable, -d DISABLE Disable the checker with the given 'check-name', separated by commas.
--enable, -e ENABLE Enable the checker with the given 'check-name', separated by commas. Default: All checks are enabled by default
--config, -c CONFIG Path to a configuration file (default: .oca_hooks.cfg)
--list-msgs List all currently enabled messages.
--fix Automatically fix files when possible
Examples
-
csv-duplicate-record-id
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/ir.model.access.csv#L5 Duplicate CSV record
access_account_account_typebroken_module/ir.model.access.csv:6
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/ir.model.access.csv#L5 Duplicate CSV record
-
csv-syntax-error
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/syntax_err_module/ir.model.access.csv#L1 'utf-8' codec can't decode byte 0xf1 in position 47: invalid continuation byte
-
field-string-redundant
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L98 The 'string' attribute is redundant and should be removed. (has autofix) You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=field-string-redundantor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L130 The 'string' attribute is redundant and should be removed. (has autofix) You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=field-string-redundantor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L140 The 'string' attribute is redundant and should be removed. (has autofix) You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=field-string-redundantor# lint-ignore
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L98 The 'string' attribute is redundant and should be removed. (has autofix) You can disable this check by adding the following comment to the affected line or just above it
-
file-not-used
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/__openerp__.py#L1 File "broken_module/report/test_report.xml" is not referenced in the manifest. 🔴 If it is loaded from another source (e.g. a post_init_hook script), just add it under the section "oca_data_manual": ["report/test_report.xml",] to be considered. 🔵 Otherwise, you might want to remove it.
-
manifest-superfluous-key
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/__openerp__.py#L32 Delete empty values. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=manifest-superfluous-keyor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/__openerp__.py#L34 Delete empty values. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=manifest-superfluous-keyor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/woversion_module/__manifest__.py#L8 Delete empty values. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=manifest-superfluous-keyor# lint-ignore
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/__openerp__.py#L32 Delete empty values. You can disable this check by adding the following comment to the affected line or just above it
-
manifest-syntax-error
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/manifest_werror/__manifest__.py#L1 Manifest could not be loaded manifest malformed
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/woinit_module/__manifest__.py#L1 Manifest could not be loaded
-
prefer-env-translation
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L247 Use self.env._(...) instead of _(…) directly inside Odoo model methods. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=prefer-env-translationor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L264 Use self.env._(...) instead of _(…) directly inside Odoo model methods. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=prefer-env-translationor# lint-ignore - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L267 Use self.env._(...) instead of _(…) directly inside Odoo model methods. You can disable this check by adding the following comment to the affected line or just above it
# lint-ignore=prefer-env-translationor# lint-ignore
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/broken_model.py#L247 Use self.env._(...) instead of _(…) directly inside Odoo model methods. You can disable this check by adding the following comment to the affected line or just above it
-
prefer-readme-rst
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/README.md#L1 Prefer README.rst instead of README.md
-
unused-logger
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/model_inhe1.py#L17 Unused
_loggeris not allowed in Odoo models. Remove it if not used. You can disable this check by adding the following comment to the affected line or just above it# lint-ignore=unused-loggeror# lint-ignore
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/models/model_inhe1.py#L17 Unused
-
use-header-comments
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/eleven_module/models.py#L9 Use of header comments in lines 3, 5, 6, 7, 9
-
weblate-component-too-long
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/syntax_err_module/__manifest__.py#L1 Repo Name + Odoo version + Module name is too long for weblate component 'big-big-big-big-big-big-big-big-big-big-big-big-big-big-big-big-big--00.0-syntax_err_module' size 91 is longer than 90 characters
-
xml-create-user-wo-reset-password
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/res_users.xml#L10 record res.users without
context="{'no_reset_password': True}"
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/res_users.xml#L10 record res.users without
-
xml-dangerous-qweb-replace-low-priority
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L4 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"ort-if="False"first - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L7 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"ort-if="False"first - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L18 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"ort-if="False"first
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L4 Dangerous use of
-
xml-deprecated-data-node
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L3 Deprecated
<data>node Use<odoo>instead of<odoo><data>or<odoo noupdate="1">instead of<odoo><data noupdate="1"> - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L3 Deprecated
<data>node Use<odoo>instead of<odoo><data>or<odoo noupdate="1">instead of<odoo><data noupdate="1"> - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L3 Deprecated
<data>node Use<odoo>instead of<odoo><data>or<odoo noupdate="1">instead of<odoo><data noupdate="1">
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L3 Deprecated
-
xml-deprecated-oe-chatter
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/odoo18_module/views/deprecated_chatter.xml#L6 Please replace old style chatters with the new tag .
-
xml-deprecated-openerp-node
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L2 Deprecated
<openerp>xml node Use<odoo>instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L2 Deprecated
<openerp>xml node Use<odoo>instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/model_view.xml#L2 Deprecated
<openerp>xml node Use<odoo>instead
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L2 Deprecated
-
xml-deprecated-qweb-directive
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L7 Deprecated QWeb directive
t-esc-options. Uset-optionsinstead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L37 Deprecated QWeb directive
t-field-options. Uset-optionsinstead
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L7 Deprecated QWeb directive
-
xml-deprecated-qweb-directive-15
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/odoo18_module/views/deprecated_qweb_directives15.xml#L6 Deprecated QWeb directive
t-esc. Uset-outinstead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/odoo18_module/views/deprecated_qweb_directives15.xml#L7 Deprecated QWeb directive
t-raw. Uset-outinstead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/odoo18_module/views/deprecated_qweb_directives15.xml#L13 Deprecated QWeb directive
t-esc. Uset-outinstead
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/odoo18_module/views/deprecated_qweb_directives15.xml#L6 Deprecated QWeb directive
-
xml-deprecated-tree-attribute
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo.xml#L31 Deprecated "<tree string=..."
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo.xml#L42 Deprecated "<tree colors=..."
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo.xml#L53 Deprecated "<tree fonts=..."
-
xml-double-quotes-py
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/model_view.xml#L10 Escaped double quotes " for python code detected use Use single quote instead:
state in ('done') - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/model_view.xml#L20 Escaped double quotes " for python code detected Use single quote instead:
{'group_by': ['name']} - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/model_view.xml#L22 Escaped double quotes " for python code detected use Use single quote instead:
[('state', '=', 'done')]
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/model_view.xml#L10 Escaped double quotes " for python code detected use Use single quote instead:
-
xml-duplicate-fields
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L5 Duplicate xml field
namebroken_module/model_view_odoo2.xml:12 - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L22 Duplicate xml field
modelbroken_module/model_view_odoo2.xml:23 - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L80 Duplicate xml field
archbroken_module/model_view_odoo2.xml:83
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L5 Duplicate xml field
-
xml-duplicate-record-id
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L5 Duplicate xml record id
view_model_formbroken_module/model_view_odoo.xml:5 broken_module/model_view_odoo2.xml:4 - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L5 Duplicate xml record id
view_model_form2broken_module/model_view_odoo2.xml:16
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L5 Duplicate xml record id
-
xml-duplicate-template-id
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L3 Duplicate xml template id
qweb/my_template1_noupdate_0broken_module/template1_copy2.xml:3 - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L10 Duplicate xml template id
qweb/my_template2_noupdate_0broken_module/template1_copy2.xml:10 - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L17 Duplicate xml template id
qweb/my_template3_noupdate_0broken_module/template1_copy2.xml:17
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L3 Duplicate xml template id
-
xml-field-bool-without-eval
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L18 Field
activewith boolean value withoutevalattribute - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L18 Field
activewith boolean value withoutevalattribute
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L18 Field
-
xml-field-numeric-without-eval
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L8 Field
prioritywith numeric value withoutevalattribute - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L22 Field
sequencewith numeric value withoutevalattribute - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L62 Field
prioritywith numeric value withoutevalattribute
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L8 Field
-
xml-header-missing
-
xml-header-wrong
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/demo/duplicated_id_demo.xml#L1 XML header expected '' but received ''
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/deprecated_disable.xml#L1 XML header expected '' but received ''
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L1 XML header expected '' but received ''
-
xml-id-position-first
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/deprecated_disable.xml#L4 The "id" attribute must be first
<record id="duplicate_record" model=...Use<record id="duplicate_record" model=...instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L43 The "id" attribute must be first
<record id="view_ir_config_search" model=...Use<record id="view_ir_config_search" model=...instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L68 The "id" attribute must be first
<record id="access_rule" model=...Use<record id="access_rule" model=...instead
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/deprecated_disable.xml#L4 The "id" attribute must be first
-
xml-not-valid-char-link
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L59 The resource in in src/href contains a not valid character
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L61 The resource in in src/href contains a not valid character
-
xml-oe-structure-missing-id
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L9 Consider removing the class
oe_structureor adding a proper id to the tag. The id must containoe_structure - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L13 Consider removing the class
oe_structureor adding a proper id to the tag. The id must containoe_structure - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L41 Consider removing the class
oe_structureor adding a proper id to the tag. The id must containoe_structure
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L9 Consider removing the class
-
xml-record-missing-id
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L25 Record has no id, add a unique one to create a new record, use an existing one to update it
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L28 Record has no id, add a unique one to create a new record, use an existing one to update it
-
xml-redundant-module-name
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L15 Redundant module name
<record id="broken_module.view_model_form2"Use<record id="view_model_form2"instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L158 Redundant module name
<menuitem id="broken_module.menu_root"Use<menuitem id="menu_root"instead - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view_odoo2.xml#L165 Redundant module name
<menuitem id="broken_module.menu_root2"Use<menuitem id="menu_root2"instead
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L15 Redundant module name
-
xml-syntax-error
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/file_no_exist.xml#L1 [Errno 2] No such file or directory: ''
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/file_no_exist.xml#L1 [Errno 2] No such file or directory: ''
-
xml-template-prettier-incompatible
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L22 Node
<textarea ...><t t-out=...incompatible for Prettier XML auto-fix. To prevent unexpected text insertion prefer<textarea t-out=... - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L24 Node
<textarea ...><t t-out=...incompatible for Prettier XML auto-fix. To prevent unexpected text insertion prefer<textarea t-out=... - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L26 Node
<textarea ...><t t-out=...incompatible for Prettier XML auto-fix. To prevent unexpected text insertion prefer<textarea t-out=...
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/website_templates.xml#L22 Node
-
xml-view-dangerous-replace-low-priority
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L25 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"orinvisible="1"first - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L37 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"orinvisible="1"first - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L47 Dangerous use of
replacefrom view with priority 0 < 99 Only replace as a last resort. Tryposition="attributes",position="move"orinvisible="1"first
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view2.xml#L25 Dangerous use of
-
xml-xpath-translatable-item
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L11 Use of translatable xpath
text() - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1.xml#L39 Use of translatable xpath
text() - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/template1_copy.xml#L31 Use of translatable xpath
text()
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/model_view.xml#L11 Use of translatable xpath
Examples PO
-
po-duplicate-message-definition
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L17 Duplicate PO message definition
Branchin lines 23, 29. Odoo exports these items by msgid and delete one of them. Use thei18n_extrafolder instead ofi18nto ignore this message. - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L35 Duplicate PO message definition
Message id toooooooooooooooooooooooooooo...in lines 41. Odoo exports these items by msgid and delete one of them. Use thei18n_extrafolder instead ofi18nto ignore this message. - https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L65 Duplicate PO message definition
One variable {variable1}in lines 71. Odoo exports these items by msgid and delete one of them. Use thei18n_extrafolder instead ofi18nto ignore this message.
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L17 Duplicate PO message definition
-
po-duplicate-model-definition
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L17 Translation for model:ir.model.fields,field_description:broken_module.field_wizard_description has been defined more than once in line(s) 29
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L35 Translation for model:ir.model.fields,field_description2:broken_module.field_wizard_description2 has been defined more than once in line(s) 41
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L59 Translation for model:ir.model.fields,field_description5:broken_module.field_wizard_description5 has been defined more than once in line(s) 65
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/i18n/fr.po#L24 Translation for model:ir.model.fields,field_description2:test_module.field_description2 has been defined more than once in line(s) 24
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/i18n/fr.po#L31 Translation for model:ir.model.fields,field_description5:test_module.field_description5 has been defined more than once in line(s) 31
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/i18n/fr.po#L38 Translation for model:ir.model.fields,field_description3:test_module.field_description3 has been defined more than once in line(s) 38
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/i18n/fr.po#L45 Translation for model:ir.model.fields,field_description4:test_module.field_description4 has been defined more than once in line(s) 45
-
po-pretty-format
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/ar_unicode.po Wrong formatting
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/broken_module.pot Wrong formatting
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po Wrong formatting
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/xml_semi_empty.po Wrong formatting
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/eleven_module/i18n/ugly.po Wrong formatting
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/test_module/i18n/fr.po Wrong formatting
-
po-python-parse-format
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L53 Translation string couldn't be parsed correctly using str.format IndexError('Replacement index 1 out of range for positional args tuple')
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L59 Translation string couldn't be parsed correctly using str.format IndexError('Replacement index 1 out of range for positional args tuple')
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L65 Translation string couldn't be parsed correctly using str.format KeyError('variable2')
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L71 Translation string couldn't be parsed correctly using str.format KeyError('variable2')
-
po-python-parse-printf
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L47 Translation string couldn't be parsed correctly using str%variables TypeError('not all arguments converted during string formatting')
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/es.po#L83 Translation string couldn't be parsed correctly using str%variables TypeError('%d format: a real number is required, not str')
-
po-requires-module
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/broken_module.pot#L14 Translation entry requires comment
#. module: MODULE
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module/i18n/broken_module.pot#L14 Translation entry requires comment
-
po-syntax-error
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/broken_module2/i18n/en.po#L1 Syntax error in po file
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.20/test_repo/syntax_err_module/i18n/es.po#L19 Syntax error in po file
Licenses
This repository is licensed under AGPL-3.0.
OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.
CHANGES
v0.2.20
- [REF] pre-commit-hooks: Use better description instead of duplicated
v0.2.19
- [REF] test: Add test for xml-deprecated-qweb-directive-15 check (#179)
- [IMP] checks_odoo_module_xml: Add NodeContent class and improve the comment lines (#176)
- [ADD] xml-double-quotes-py: Detect XML attributes containing escaped double quotes " -> (") (#178)
v0.2.18
- [REF] coveragerc: Relax 'fail under' parameter since that coveralls cover all the tests together insteaad of individual
- [ADD] weblate-component-too-long: Check if the weblate component name is too long
v0.2.17
- [ADD] xml-deprecated-qweb-directive-15: t-esc and t-raw directives are deprecated in Odoo v15.0, use t-out instead (#174)
v0.2.16
- [REF] field-string-redundant: Skip related fields in the check (#173)
v0.2.15
- [ADD] field-string-redundant: Add old pylint known check but with autofix (#172)
- [REF] tox, github: Enable tox env 'multi' to run multiple jobs (#171)
v0.2.14
- [REF] test_profiling: Enable profiling from pytest
- [REF] checks_odoo_module_fixit: Use pathlib instead of os.path
- [FIX] fixit: Use the correct disable comment (#168)
- [REF] tests: Migrating unittest to pytest (#167)
- [REF] prefer-env-translation: Consider static method case (#165)
- [REF] prefer-env-translation: Consider new test cases (#164)
v0.2.13
- [REF] checks_odoo_module_fixit: Use a separated entrypoint to be called from pre_commit with parallels (#163)
- [IMP] prefer-env-translation: Now supports multiple calls in the same line (#162)
v0.2.12
- [FIX] prefer-env-translation: Skip check if it is not Odoo's class (#161)
v0.2.11
- [FIX] use-header-comments: Remove extra newline (#160)
- [REF] readme: Use whole original message (#159)
v0.2.10
- [REF] use-header-comments: Skip fully commented files to avoid deletion (#158)
v0.2.9
- [ADD] use-header-comments: New check to remove comments in the py headers (#157)
- [REF] fixit: If the environment variable FIXIT_ODOO_VERSION is defined so it is used (#154)
- [REF] checks_odoo_module_xml: Use filename_short instead of full path (#156)
v0.2.8
- [REF] requirements: Use fixit from pypi after recent release (#155)
v0.2.7
- [ADD] unused-logger: Add new check for unused _logger with autofix (#153)
v0.2.6
- [ADD] xml-template-prettier-incompatible: Add new check for xml template node incompatible with prettier autofixes (#150)
- [REF] github-actions: Enable py3.14 stable and use to build, lint and update-readme (#152)
- [IMP] xml-id-position-first: Consider 'template' tag (#151)
v0.2.5
- [ADD] xml-field-bool-without-eval, xml-field-numeric-without-eval: Check for bool or numeric fields without eval in xml records (#147)
v0.2.4
- [FIX] file-not-used: Skip check for non-installable modules
- [ADD] prefer-readme-rst: Add new check to prefer README.rst over README.md
v0.2.3
- [REF] github: The macOS-13 based runner images are now retired. (#146)
- [REF] checks_odoo_module_xml: Support auto-fixing multiline attributes (#145)
v0.2.2
- [REF] manifest-superfluous-key: Consider boolean keys are `False` by default (#144)
- [REF] checks_odoo_module_xml: Add the tag to be replace at fine grane (#143)
v0.2.1
- [REF] xml-redundant-module-name: Add autofix
- [ADD] xml-id-position-first: Add check to detect when xml id is not the first attribute
v0.2.0
- [ADD] prefer-env-translation, manifest-superfluous-key: Add new checks with autofix using fixit library (#141)
v0.1.8
- [ADD] xml-header-missing, xml-header-wrong: Add new XML checks with autofix (#140)
v0.1.7
- [REM] xml-dangerous-filter-wo-user: Remove outdated check for dangerous filters without user (#139)
- [REF] *: Small fixes (#137)
v0.1.6
- [REF] requirements.txt: Update polib (#134)
v0.1.5
- [REF] global_parser: FileType is deprecated for py3.14
- [REF] github-actions: Use py3.14-dev
- [REF] github-actions: Add codecov token to fix upload coverage (#131)
v0.1.4
- [REF] file-not-used: Skip option using "oca_data_manual" in the manifest file (#130)
v0.1.3
- [FIX] requirements.txt: Add missing 'packaging' requirement (#129)
v0.1.2
- [ADD] file-not-used: Detects files not used from manifest (#127)
- [FIX] utils: Fix "TypeError: expected string or bytes-like object, got 'NoneType'" (#128)
- [ADD] xml-deprecated-oe-chatter: Check for deprecated chatter for odoo v18.0+ (#125)
v0.1.1
- [REF] po-duplicate-message-definition: Ignore i18n_extra folder (#123)
v0.1.0
- [REF] checks_odoo_module_po: Remove special char incompatible with windows codecs (#117)
- [REF] README: Update readme with new py3.13 version
- [REF] setup.py: Deprecate py3.8-
v0.0.35
- [FIX] po-pretty-format: Allow original=translated term for "i18n_extra" folder (#113)
v0.0.34
- [IMP] *: Display the duplicated lines (#111)
- [REF] tox.ini: Add compatibility with new pyttest (#112)
- [IMP] csv-duplicate-record-id: show the actual record id
- [IMP] xml-duplicate-record-id: show the actual record id
v0.0.33
- [IMP] check_odoo_module_po: extract line number from error message (#108)
- [IMP] Better error output (#106)
v0.0.32
- [FIX] unwanted execution of globally disabled checks (#105)
- [REF] github-actions: Use exclude macosx-latest for py old (#104)
- [REF] github-actions: Add arch in cache-key to use macosx m1 and intel compatibility (#103)
- [REF] setup: Add setuptools deps to build Related to https://github.com/pypa/build/issues/98
- [REF] github-actions: Use macosx-latest only for py-latest and macosx-14 for older Related to https://github.com/actions/setup-python/issues/825\#issuecomment-2096792396
v0.0.31
- [REF] setup: Add py3.12 support info (#98)
- [REF] .github: Update actions version, fix cache and update lints (#97)
- [REF] tests: Fixing windows po autofix unitest (#96)
v0.0.30
- CI improvements (#93)
- [REF] setup: Enable py311 classifier (#87)
v0.0.29
- IMP] add xml-duplicate-template-id message (#82)
- [FIX] lints (#86)
- [ADD] po-duplicate-model-definition check (#85)
- [REF] Don't filter out messages, move is_message_enabled (#83)
- [IMP] add xml-record-missing-id (#84)
v0.0.28
- [FIX] oe-structure-missing-id: change constraints, add docs (#81)
v0.0.27
- [REF] improve xpath expressions (#80)
v0.0.26
- [IMP] Improve XPath expressions, compile them only once, fix false negative, add profiling tests (#79)
- [ADD] pretty-format-po check (#76)
- [IMP] add xml-oe-structure-missing-id check (#78)
- [REF] tests: Generate immutable readme (without extra spaces)
- [IMP] README: Added a section on configuration
v0.0.25
- [REF] requirements.txt: Update polib to fix issues and improves (#72)
v0.0.24
- [FIX] pre-commit: Fix isort hook - RuntimeError The Poetry configuration is invalid (#71)
v0.0.23
- [FIX] Correct documentation (#69)
v0.0.22
- [IMP] Help msg for "xml-view-dangerous-replace-low-priority" (#68)
- Wrote documentation for proposed refactoring (#66)
- [FIX] ci: update flake8 repo URL, tox.ini and gh actions .yml (#65)
- [REF] hooks: Add support for `` (#62)
v0.0.21
- [REF] duplicate-xml-fields: Only applies to direct record's children (#58)
v0.0.20
- [FIX] xml-xpath-translatable-item: Fix false negative calling a method o.amount_to_text() (#57)
v0.0.19
- [FIX] setup: Add missing "requirements.txt" file to package (#441) (#55)
v0.0.18
- [FIX] checks_odoo_module: Support glob expression for "qweb" manifest data section (#54)
- [IMP] oca_pre_commit_hooks: Add --list-msgs option (#53)
- [REF] oca_pre_commit_hooks: Silent subprocess git error (#52)
v0.0.17
- [IMP] oca_pre_commit_hooks: Support enable/disable from ENV (#38) (#49)
v0.0.16
- [ADD] xml-xpath-translatable-item: Add new check to identify mutable item used from xpath (#50)
v0.0.15
- [FIX] oca_pre_commit_hooks: Fix exit_status false error (#48)
v0.0.14
- [IMP] oca_pre_commit_hooks: Support for config file (#41)
v0.0.13
- [REF] pylint_odoo: Remove TODO comments (#47)
- [REF] requirements: Remove unused libraries and pre-commit hooks (#45)
- [REF] xml-deprecated-data-node: Use the data node sourceline instead of odoo node (#43)
- [IMP] oca_pre_commit_hooks: Support disable XML checks from disable comments (#42)
- [REF] README: Fix name of pypi package (#35)
- [REF] oca_pre_commit_hooks: cli_po, cli: Add cli_po and cli global (#36)
- [REF] setup: Match requires-python = ">=3.7" from pre-commit
- [REF] CI: Enable py3.11
v0.0.12
- [REF] checks_odoo_module_xml: Allow duplicated fields with 'groups' (#32)
- [REF] CI: Enable tox with parallels + codecov compatibility (#33)
v0.0.11
- [REF] codecov: Enable codecov again
- [REM] missing-readme: Check add to pylint-odoo
- [REF] TOX: Strip names, remove no-cover, compatible with parallels option (#24)
- [REF] lint: Adapt lints for py packages instead of odoo module (#23)
v0.0.10
- [REF] README: Update README and fix mutable results auto-generating it (#22)
- [REF] checks_odoo_module_po: Run on modified PO files only (#21)
- [REF] manifest: Skip duplicated data files (#20)
v0.0.9
- [FIX] README: Fix regex to replace autogenerated content (#18)
- [REF] README: Detect from CI if README needs to be updated (#17)
v0.0.8
- [REF] README: Add examples of checks section and script to auto-generate it (#16)
- [REF] README: Add help section and script to auto-generate it (#15)
v0.0.7
- [REF] checks: name_checks changed to name-checks (#14)
- [REF] oca_pre_commit_hooks: Use shorter path in messages (#13)
- [FIX] pre-commit-hooks.yaml: Run checks even if the manifest was not changed
- [REF] test: Remove TODO comments already fixed
v0.0.6
- [FIX] oca_pre_commit_hooks: Fix checks if it has syntax error (#8)
v0.0.5
- [REF] oca_pre_commit_hooks: Small improvements (#7)
v0.0.4
- [IMP] oca_pre_commit_hooks: Enable feature to 'enable' checks (#6)
- [IMP] oca_pre_commit_hooks: Add entrypoint arguments to disable checks (#5)
v0.0.3
- [REF] README: Remove deprecated CI build
v0.0.2
- [REF] CI: Re-use tox to run pre-commit in the CI with same caches and packages
- [ADD] .pre-commit-hooks.yaml: Compatible with pre-commit-hooks to use as hook id directly
v0.0.1
- [ADD] Migrate pylint-odoo checks (not related to python) to pre-commit hooks (#2)
- Initialize
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oca_odoo_pre_commit_hooks-0.2.20.tar.gz.
File metadata
- Download URL: oca_odoo_pre_commit_hooks-0.2.20.tar.gz
- Upload date:
- Size: 82.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172183af16be2a77deb1e7fe8aa0a398804a54bd01f4c41814e55af7e93b797e
|
|
| MD5 |
6fc39092ea01e928569d4a0a1f619c92
|
|
| BLAKE2b-256 |
e49b1e76ca3fa56568f6b54465d059a814b98d7cb486de664f9defcebc34f06c
|
File details
Details for the file oca_odoo_pre_commit_hooks-0.2.20-py3-none-any.whl.
File metadata
- Download URL: oca_odoo_pre_commit_hooks-0.2.20-py3-none-any.whl
- Upload date:
- Size: 68.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db863977d439ba872539bb7b87859984cbaa96a6add4bdf235d008d19fd01a2
|
|
| MD5 |
e49a5abe98f6d7d2d771968c8af4b8fa
|
|
| BLAKE2b-256 |
0d3453093c23b37dffbeb7c278f913421ec22a0fdcb9f56e08f1f968a361195f
|