Enable custom checks for Odoo modules.
Code | Description | Short name |
---|---|---|
C7902 | Missing ./README.rst file. Template here: %s | missing-readme |
C8101 | Missing author required "%s" in manifest file | manifest-required-author |
C8102 | Missing required key "%s" in manifest file | manifest-required-key |
C8103 | Deprecated key "%s" in manifest file | manifest-deprecated-key |
C8104 | Use CamelCase "%s" in class name "%s". You can use oca-autopep8 of https://github.com/OCA/maintainer-tools to auto fix it. |
class-camelcase |
C8105 | License "%s" not allowed in manifest file. | license-allowed |
C8198 | String parameter of raise "%s" requires translation. Use _(%s) | translation-required |
C8199 | Wrong Version Format "%s" in manifest file. Regex to match: "%s" | manifest-version-format |
C8201 | No UTF-8 coding comment found: Use # coding: utf-8 or # -*- coding: utf-8 -*- |
no-utf8-coding-comment |
E7901 | %s:%s %s | rst-syntax-error |
E7902 | %s error: %s | xml-syntax-error |
E7903 | %s | po-syntax-error |
E8101 | The author key in the manifest file must be a string (with comma separated values) | manifest-author-string |
E8198 | Use % in execute functions and pass the % parameters as arguments | sql-injection |
E8199 | Use of cr.commit() directly - More info http://members.hellug.gr/xrg/openerp-doc/html/contribute/15_guidelines/coding_guidelines_framework.html#never-commit-the-transaction | invalid-commit |
R8101 | Import Warning should be renamed as UserError from openerp.exceptions import Warning as UserError |
openerp-exception-warning |
W7901 | Dangerous filter without explicit user_id in xml_id %s |
dangerous-filter-wo-user |
W7902 | Duplicate xml record id %s | duplicate-xml-record-id |
W7903 | %s | javascript-lint |
W7904 | %s:%d Deprecated <openerp> xml node | deprecated-openerp-xml-node |
W7905 | %s:%d record res.users without context="{'no_reset_password': True}" | create-user-wo-reset-password |
W7906 | Duplicate id "%s" in ir.model.access.csv file | duplicate-id-csv |
W7907 | Duplicate xml field "%s" | duplicate-xml-fields |
W7908 | Missing newline in "%s" file | missing-newline-extrafiles |
W7909 | Redundant name module reference in xml_ids "%s" of "%s" file | redundant-modulename-xml |
W7910 | %s:%s:%s: Use wrong tabs indentation instead of four spaces | wrong-tabs-instead-of-spaces |
W7911 | %s | po-lint |
W8101 | Detected api.one and api.multi decorators together. | api-one-multi-together |
W8102 | Missing api.one or api.multi in copy function. | copy-wo-api-one |
W8103 | Translation method _("string") in fields is not necessary. | translation-field |
W8104 | api.one deprecated | api-one-deprecated |
W8105 | attribute "%s" deprecated | attribute-deprecated |
W8106 | Missing super call in "%s" method. |
method-required-super |
W8201 | Incoherent interpreter comment and executable permission. Interpreter: [%s] Exec perm: %s | incoherent-interpreter-exec-perm |
W8202 | Use of vim comment | use-vim-comment |
# pip install --upgrade git+https://github.com/oca/pylint-odoo.git
Or
# pip install --upgrade --pre pylint-odoo
pylint --load-plugins=pylint_odoo --disable all --enable odoolint [MODULE_PATH]
Where [MODULE_PATH]
is a path to an Odoo module.
If you want to test a group of modules, you can temporarily create a __init__.py
file on the parent directory of the modules.
- pofilter: You can use these options to enable or disable specific checkers of the pofilter linter. See the complete list of checks here.
--po-lint-enable
: a comma separated list of checks to enable.--po-lint-disable
: a comma separated list of checks to disable.
For rst-syntax-error skip unknown directives