Pylint plugin for Odoo
Project description
Pylint Odoo plugin
Enable custom checks for Odoo modules.
Short Name | Description | Code |
---|---|---|
attribute-deprecated | attribute "%s" deprecated | W8105 |
attribute-string-redundant | The attribute string is redundant. String parameter equal to name of variable | W8113 |
bad-builtin-groupby | Used builtin function itertools.groupby . Prefer odoo.tools.groupby instead. More info about https://github.com/odoo/odoo/issues/105376 |
W8155 |
category-allowed | Category "%s" not allowed in manifest file. | C8114 |
consider-merging-classes-inherited | Consider merging classes inherited to "%s" from %s. | R8180 |
context-overridden | Context overridden using dict. Better using kwargs with_context(**%s) or with_context(key=value) |
W8121 |
deprecated-odoo-model-method | %s has been deprecated by Odoo. Please look for alternatives. | W8160 |
development-status-allowed | Manifest key development_status "%s" not allowed. Use one of: %s. | C8111 |
except-pass | pass into block except. If you really need to use the pass consider logging that exception | W8138 |
external-request-timeout | Use of external request method %s without timeout. It could wait for a long time |
E8106 |
invalid-commit | Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction | E8102 |
license-allowed | License "%s" not allowed in manifest file. | C8105 |
manifest-author-string | The author key in the manifest file must be a string (with comma separated values) | E8101 |
manifest-behind-migrations | Manifest version (%s) is lower than migration scripts (%s) | E8145 |
manifest-data-duplicated | The file "%s" is duplicated in lines %s from manifest key "%s" | W8125 |
manifest-deprecated-key | Deprecated key "%s" in manifest file | C8103 |
manifest-maintainers-list | The maintainers key in the manifest file must be a list of strings | E8104 |
manifest-required-author | One of the following authors must be present in manifest: %s | C8101 |
manifest-required-key | Missing required key "%s" in manifest file | C8102 |
manifest-version-format | Wrong Version Format "%s" in manifest file. Regex to match: "%s" | C8106 |
method-compute | Name of compute method should start with "compute" | C8108 |
method-inverse | Name of inverse method should start with "inverse" | C8110 |
method-required-super | Missing super call in "%s" method. |
W8106 |
method-search | Name of search method should start with "search" | C8109 |
missing-readme | Missing ./README.rst file. Template here: %s | C8112 |
missing-return | Missing return (super is used) in method %s. |
W8110 |
no-raise-unlink | No exceptions should be raised inside unlink() functions | E8140 |
no-wizard-in-models | No wizard class for model directory. See the complete structure https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#complete-structure | C8113 |
no-write-in-compute | Compute method calling write . Use update instead. |
E8135 |
odoo-addons-relative-import | Same Odoo module absolute import. You should use relative import with "." instead of "odoo.addons.%s" | W8150 |
odoo-exception-warning | odoo.exceptions.Warning is a deprecated alias to odoo.exceptions.UserError use from odoo.exceptions import UserError |
R8101 |
print-used | Print used. Use logger instead. |
W8116 |
renamed-field-parameter | Field parameter "%s" is no longer supported. Use "%s" instead. | W8111 |
resource-not-exist | File "%s": "%s" not found. | F8101 |
sql-injection | SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection | E8103 |
test-folder-imported | Test folder imported in module %s | E8130 |
translation-contains-variable | Translatable term in "%s" contains variables. Use %s instead | W8115 |
translation-field | Translation method _("string") in fields is not necessary. | W8103 |
translation-format-interpolation | Use %s formatting in odoo._ functions | W8302 |
translation-format-truncated | Logging format string ends in middle of conversion specifier | E8301 |
translation-fstring-interpolation | Use %s formatting in odoo._ functions | W8303 |
translation-not-lazy | Use %s formatting in odoo._ functions | W8301 |
translation-positional-used | Translation method _(%s) is using positional string printf formatting. Use named placeholder _("%%(placeholder)s") instead. |
W8120 |
translation-required | String parameter on "%s" requires translation. Use %s_(%s) | C8107 |
translation-too-few-args | Not enough arguments for odoo._ format string | E8306 |
translation-too-many-args | Too many arguments for odoo._ format string | E8305 |
translation-unsupported-format | Unsupported odoo._ format character %r (%#02x) at index %d | E8300 |
use-vim-comment | Use of vim comment | W8202 |
website-manifest-key-not-valid-uri | Website "%s" in manifest key is not a valid URI | W8114 |
Install
You do not need to install manually if you use pre-commit-config
But if you even need to install it
pip install pylint-odoo
Usage pre-commit-config.yaml
Add to your ".pre-commit-config.yaml" configuration file the following input
- repo: https://github.com/OCA/pylint-odoo
rev: v9.0.3 # may be a tag or commit hash
hooks:
# Add to your .pylintrc file:
# [MASTER]
# load-plugins=pylint_odoo
- id: pylint_odoo
Usage
pylint --load-plugins=pylint_odoo -e odoolint path/to/test
or use configuration file you can generate the OCA one using the following template repository:
https://github.com/OCA/oca-addons-repo-template
Then running
pylint --rcfile=.pylintrc path/to/test
Example to test only pylint_odoo checks:
pylint --load-plugins=pylint_odoo -d all -e odoolint {ADDONS-PATH}/*
There are checks only valid for a particular Odoo version To know what version of odoo are you running pylint needs the parameter
pylint --load-plugins=pylint_odoo --valid-odoo-versions={YOUR_ODOO_VERSION}
with particular odoo version e.g. "16.0"
Checks valid only for odoo >= 14.0
translation-format-interpolation
translation-format-truncated
translation-fstring-interpolation
translation-not-lazy
translation-too-few-args
translation-too-many-args
translation-unsupported-format
Checks valid only for odoo <= 13.0
translation-contains-variable
Examples
-
attribute-deprecated
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L105 attribute "_columns" deprecated
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L106 attribute "_defaults" deprecated
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L107 attribute "length" deprecated
-
attribute-string-redundant
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L161 The attribute string is redundant. String parameter equal to name of variable
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L209 The attribute string is redundant. String parameter equal to name of variable
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L219 The attribute string is redundant. String parameter equal to name of variable
-
bad-builtin-groupby
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L110 Used builtin function
itertools.groupby
. Preferodoo.tools.groupby
instead. More info about https://github.com/odoo/odoo/issues/105376 - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L111 Used builtin function
itertools.groupby
. Preferodoo.tools.groupby
instead. More info about https://github.com/odoo/odoo/issues/105376
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L110 Used builtin function
-
consider-merging-classes-inherited
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/model_inhe2.py#L11 Consider merging classes inherited to "res.company" from testing/resources/test_repo/broken_module/models/model_inhe1.py:8:4, testing/resources/test_repo/broken_module/models/model_inhe2.py:7:4.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/model_inhe2.py#L19 Consider merging classes inherited to "res.partner" from testing/resources/test_repo/broken_module/models/model_inhe2.py:15:4.
-
context-overridden
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L192 Context overridden using dict. Better using kwargs
with_context(**{'overwrite_context': True})
orwith_context(key=value)
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L194 Context overridden using dict. Better using kwargs
with_context(**ctx)
orwith_context(key=value)
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L196 Context overridden using dict. Better using kwargs
with_context(**ctx2)
orwith_context(key=value)
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L192 Context overridden using dict. Better using kwargs
-
deprecated-odoo-model-method
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L91 fields_view_get has been deprecated by Odoo. Please look for alternatives.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/eleven_module/models.py#L17 fields_view_get has been deprecated by Odoo. Please look for alternatives.
-
development-status-allowed
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module2/__openerp__.py#L6 Manifest key development_status "InvalidDevStatus" not allowed. Use one of: Alpha, Beta, Mature, Production/Stable.
-
except-pass
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/except_pass.py#L11 pass into block except. If you really need to use the pass consider logging that exception
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/except_pass.py#L53 pass into block except. If you really need to use the pass consider logging that exception
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/except_pass.py#L62 pass into block except. If you really need to use the pass consider logging that exception
-
external-request-timeout
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L685 Use of external request method
requests.delete
without timeout. It could wait for a long time - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L686 Use of external request method
requests.get
without timeout. It could wait for a long time - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L687 Use of external request method
requests.head
without timeout. It could wait for a long time
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L685 Use of external request method
-
invalid-commit
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L404 Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L405 Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L406 Use of cr.commit() directly - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#never-commit-the-transaction
-
license-allowed
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module2/__openerp__.py#L4 License "unknow license" not allowed in manifest file.
-
manifest-author-string
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module3/__openerp__.py#L5 The author key in the manifest file must be a string (with comma separated values)
-
manifest-behind-migrations
- https://github.com/OCA/pylint-odoo/blob/v9.0.1/testing/resources/test_repo/broken_module2/__openerp__.py#L2 Manifest version (1.0) is lower than migration scripts (2.0)
- https://github.com/OCA/pylint-odoo/blob/v9.0.1/testing/resources/test_repo/eleven_module/__manifest__.py#L1 Manifest version (11.0.1.0.0) is lower than migration scripts (11.0.1.0.1)
- https://github.com/OCA/pylint-odoo/blob/v9.0.1/testing/resources/test_repo/test_module/__openerp__.py#L2 Manifest version (10.0.1.0.0) is lower than migration scripts (11.0.1.0.0)
-
manifest-data-duplicated
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L18 The file "duplicated.xml" is duplicated in lines 19 from manifest key "data"
-
manifest-deprecated-key
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L7 Deprecated key "description" in manifest file
-
manifest-maintainers-list
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module3/__openerp__.py#L6 The maintainers key in the manifest file must be a list of strings
-
manifest-required-author
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L5 One of the following authors must be present in manifest: 'Odoo Community Association (OCA)'
-
manifest-required-key
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L2 Missing required key "license" in manifest file
-
manifest-version-format
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L8 Wrong Version Format "8_0.1.0.0" in manifest file. Regex to match: "(4.2|5.0|6.0|6.1|7.0|8.0|9.0|10.0|11.0|12.0|13.0|14.0|15.0|16.0|17.0).\d+.\d+.\d+$"
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module2/__openerp__.py#L8 Wrong Version Format "1.0" in manifest file. Regex to match: "(4.2|5.0|6.0|6.1|7.0|8.0|9.0|10.0|11.0|12.0|13.0|14.0|15.0|16.0|17.0).\d+.\d+.\d+$"
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module3/__openerp__.py#L8 Wrong Version Format "8.0.1.0.0foo" in manifest file. Regex to match: "(4.2|5.0|6.0|6.1|7.0|8.0|9.0|10.0|11.0|12.0|13.0|14.0|15.0|16.0|17.0).\d+.\d+.\d+$"
-
method-compute
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L155 Name of compute method should start with "compute"
-
method-inverse
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L157 Name of inverse method should start with "inverse"
-
method-required-super
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L40 Missing
super
call in "copy" method. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L44 Missing
super
call in "create" method. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L48 Missing
super
call in "write" method.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L40 Missing
-
method-search
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L156 Name of search method should start with "search"
-
missing-readme
-
missing-return
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L24 Missing
return
(super
is used) in method inherited_method.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L24 Missing
-
no-raise-unlink
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/res_partner_unlink.py#L9 No exceptions should be raised inside unlink() functions
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/sale_order_unlink.py#L14 No exceptions should be raised inside unlink() functions
-
no-wizard-in-models
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L824 No wizard class for model directory. See the complete structure https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#complete-structure
-
no-write-in-compute
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L114 Compute method calling
write
. Useupdate
instead. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L116 Compute method calling
write
. Useupdate
instead. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L119 Compute method calling
write
. Useupdate
instead.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L114 Compute method calling
-
odoo-addons-relative-import
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L49 Same Odoo module absolute import. You should use relative import with "." instead of "odoo.addons.broken_module"
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L50 Same Odoo module absolute import. You should use relative import with "." instead of "odoo.addons.broken_module"
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L51 Same Odoo module absolute import. You should use relative import with "." instead of "odoo.addons.broken_module"
-
odoo-exception-warning
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L10
odoo.exceptions.Warning
is a deprecated alias toodoo.exceptions.UserError
usefrom odoo.exceptions import UserError
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L11
odoo.exceptions.Warning
is a deprecated alias toodoo.exceptions.UserError
usefrom odoo.exceptions import UserError
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L8
odoo.exceptions.Warning
is a deprecated alias toodoo.exceptions.UserError
usefrom odoo.exceptions import UserError
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/pylint_oca_broken.py#L10
-
print-used
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/except_pass.py#L20 Print used. Use
logger
instead.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/test_module/except_pass.py#L20 Print used. Use
-
renamed-field-parameter
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L209 Field parameter "digits_compute" is no longer supported. Use "digits" instead.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L209 Field parameter "select" is no longer supported. Use "index" instead.
-
resource-not-exist
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L14 File "data": "file_no_exist.xml" not found.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L18 File "data": "duplicated.xml" not found.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__openerp__.py#L23 File "demo": "file_no_exist.xml" not found.
-
sql-injection
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L571 SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L573 SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L575 SQL injection risk. Use parameters if you can. - More info https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#no-sql-injection
-
test-folder-imported
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/__init__.py#L5 Test folder imported in module broken_module
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module2/__init__.py#L3 Test folder imported in module broken_module2
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/eleven_module/__init__.py#L3 Test folder imported in module eleven_module
-
translation-contains-variable
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L371 Translatable term in "'Variable not translatable: %s' % variable1" contains variables. Use _('Variable not translatable: %s') % variable1 instead
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L372 Translatable term in "'Variables not translatable: %s, %s' % (variable1, variable2)" contains variables. Use _('Variables not translatable: %s, %s') % (variable1, variable2) instead
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L374 Translatable term in "'Variable not translatable: %s' % variable1" contains variables. Use _('Variable not translatable: %s') % variable1 instead
-
translation-field
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L143 Translation method _("string") in fields is not necessary.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L153 Translation method _("string") in fields is not necessary.
-
translation-format-interpolation
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L380 Use lazy % or .format() or % formatting in odoo._ functions
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L381 Use lazy % or .format() or % formatting in odoo._ functions
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L468 Use lazy % or .format() or % formatting in odoo._ functions
-
translation-format-truncated
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L479 Logging format string ends in middle of conversion specifier
-
translation-fstring-interpolation
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L477 Use lazy % or .format() or % formatting in odoo._ functions
-
translation-not-lazy
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L345 Use lazy % or .format() or % formatting in odoo._ functions
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L346 Use lazy % or .format() or % formatting in odoo._ functions
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L348 Use lazy % or .format() or % formatting in odoo._ functions
-
translation-positional-used
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L372 Translation method _('Variables not translatable: %s, %s' % (variable1, variable2)) is using positional string printf formatting. Use named placeholder
_("%(placeholder)s")
instead. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L375 Translation method _('Variables not translatable: %s %s' % (variable1, variable2)) is using positional string printf formatting. Use named placeholder
_("%(placeholder)s")
instead. - https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L378 Translation method _('Variables not translatable: %s, %s' % (variable1, variable2)) is using positional string printf formatting. Use named placeholder
_("%(placeholder)s")
instead.
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L372 Translation method _('Variables not translatable: %s, %s' % (variable1, variable2)) is using positional string printf formatting. Use named placeholder
-
translation-required
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L322 String parameter on "message_post" requires translation. Use body=_('Body not translatable %s')
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L322 String parameter on "message_post" requires translation. Use subject=_('Subject not translatable')
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L324 String parameter on "message_post" requires translation. Use body=_('Body not translatable {}')
-
translation-too-few-args
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L475 Not enough arguments for odoo._ format string
-
translation-too-many-args
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L480 Too many arguments for odoo._ format string
-
translation-unsupported-format
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module/models/broken_model.py#L478 Unsupported odoo._ format character 'y' (0x79) at index 30
-
use-vim-comment
-
website-manifest-key-not-valid-uri
- https://github.com/OCA/pylint-odoo/blob/v9.0.3/testing/resources/test_repo/broken_module3/__openerp__.py#L7 Website "htt://odoo-community.com" in manifest key is not a valid URI
Development
To run all the tests run:
tox
Use extra parameters to change the test behaviour
e.g. particular python version
tox -e py310
e.g. particular unittest method
tox -e py310 -- -k test_20_expected_errors
e.g. all the tests at the same time in parallel
tox -p auto
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
v9.0.3
- [ADD] manifest-behind-migrations: check manifest version >= migrations (#475)
v9.0.2
- [REF] Add support to Odoo v17.0 (#477)
v9.0.1
- [ADD] category-allowed: Add check to enforce the allowed Odoo modules categories (#459)
v9.0.0
- [REF]: update to pylint 3.0.0, drop support for py3.7 (#474)
v8.0.22
- [REF] setup.py: Filter out "bump version" from CHANGELOG (#472)
v8.0.21
- [ADD] deprecated-odoo-model-method: New check to detect deprecated method for each Odoo version (#470)
- [REF] ci: run only one tox env per job (#468)
v8.0.20
- [REF] tox: Build ChangeLog again (#466)
- [ADD] no-raise-unlink: Check if there is raise sentence in unlink method (#458)
- [FIX] correct README pre-commit usage (#463)
v8.0.19
- [FIX] pre-commit-vauxoo: Fix isort hook - RuntimeError The Poetry configuration is invalid (#456)
v8.0.18
- [FIX] Readme: new CLI command format --valid-odoo-version (#453)
- [REF] ci: Update gh actions .yml and tox.ini (#451)
- [FIX] pre-commit-config: Update flake8 repo (#446)
v8.0.17
- [REM] Remove unused eslintrc file
- [REF] tests: Autogenerate readme with examples from test_repo
- [REF] tox, pre-commit, readme: Small changes (#443)
v8.0.16
- [ADD] bad-builtin-groupby: Prefer `odoo.tools.groupby` instead (#442)
v8.0.15
- [FIX] setup: Add missing "requirements.txt" file to package (#441)
v8.0.14
- [REF] no-wizard-in-models: Add exception for "res.config*" inherited classes (#439)
- [ADD] no-wizard-in-models: Add new check for avoid adding wizards class in models directory (#437)
v8.0.13
- [REF] consider-merging-classes-inherited: Improve message with relpath + column number (#436)
v8.0.12
- [FIX] consider-merging-classes-inherited: Fix TODO Consider case where _inherit is assigned before to _name (#435)
- [FIX] custom_logging: Fix AstroidSyntaxError using only binop related to '%' (#434)
v8.0.11
- [REF] manifest-data-duplicated, resource-not-exist: Improve line number (lineno) of the duplicated node (#433)
v8.0.10
- [FIX] pylint_odoo: Using node.op instead of hardcoded % (#432)
v8.0.9
- [FIX] pylint_odoo: "ImportError: No module named 'packaging'" (#431)
- [REF] readme: Add monthly downloads from pypi badge (#430)
- [REF] pylint_odoo: Using new typing astroid.nodes instead of astroid.Class (#429)
v8.0.8
- [ADD] no-write-in-compute: Don't write on a computed field (#427)
v8.0.7
- [REF] pylint_odoo: Replace options name from "_" to "-" because (#426)
v8.0.6
- [REF] README: Auto update README (#425)
- [REF] pylint_odoo: Process max_odoo_version and min_odoo_version for checks (#424)
- [ADD] translation-*: Add translation-* checks with the same "logging" checks but for "odoo._" translate method (#423)
- [REF] CI: Enable py3.11 (#420)
v8.0.5
- [REF] tox: Enable lints from environment list (#418)
- [REF] setup: Match requires-python = ">=3.7.2" from pylint (#417)
- [REF] CI: Enable tox with parallels + codecov compatibility (#415)
- [REF] augmentations: Use message code instead of message id for supression of codes (#414)
v8.0.4
- [REF] README: Auto-update Using pylint_odoo.messages2md()
- [REM] class-camelcase: Replaced by invalid-name (#413)
- [REF] tests: Remove 'score' (#412)
- [REF] openerp-exception-warning: Change to odoo-exception-warning (#411)
- [REF] pylint_odoo: Sort items for utils.only_required_for_messages (#410)
- [IMP] print-used: Speed-up 'print-used' check avoid inferring (#409)
- [REM] eval-referenced: Replaced by eval-used check from pylint (#408)
- [REF] pylint_odoo: visit_dict - Use the dictionary key node (#407)
v8.0.3
- [REF] Update "visit_*" methods availables and order code and update values (#406)
- [ADD] missing-readme: Add again missing-readme (#405)
- [REF] pylint_odoo: Clean code (#404)
- [REF] pylint_odoo: Clean code (#402)
v8.0.2
- [REF] codecov, README: Enable codecov again and fix URLs from README (#401)
v8.0.1
- [REF] readme: Migrate from RST to MARKDOWN format (#400)
- [REF] pylint_odoo: Small changes for CI, lints, pytest and code (#399)
- [REF] requirements: Update pylint dependency (#398)
- [IMP] pylint_odoo: black, isort, prettier (#397)
v8.0.0
- [IMP] pylint_odoo: apocalintSYS - Full refactoring - v8.0.0 (#396)
7.0.4
- [REF] translation-positional-used: Consider srt.format('{} {}') cases (#395)
7.0.3
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [REF] CI: Comment py3.7 travis with weird error unrelated
- [ADD] manifest-data-duplicated: Detect duplicated data file
7.0.2
- [FIX] attribute-string-redundant: Only when field string is the same as title() format (#392)
7.0.1
- [REF] pylint_odoo: Update supported Odoo version 16.0 (#391)
- [REF] CI: Use py3.10 and 3.11 environments for travis (#389)
- [REF] tests: Add unittest to check only one check enabled (#385)
7.0.0
- [REF] external-request-timeout: Add ftplib.FTP method (#388)
- Revert "[PERF] *: Checkers only run when enabled #372 (#376)" (#386)
- [PERF] *: Checkers only run when enabled #372 (#376)
- [FIX] missing-import-error: add xlrd to whitelist (#379)
6.2.0
- [IMP] duplicate-po-message-definition: Detecting duplicated only with msgid (#374)
- [IMP] test-folder-imported: Consider 'from . import test' missing case (#373)
6.1.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [ADD] external-request-timeout: It could wait for a long time (#370)
- [FIX] .travis.yml: npm v18.0.0 is not compatible with ubuntu used from travis (#371)
- [REF] README: Use new travis URL (#369)
6.0.0
- [ADD] pre-commit-hooks: Add pylint_odoo hook to be used from pre-commit.yaml directly (#368)
- [REF] requirements: Bump pylint package from 2.11.1 to 2.13.5 for py3.x (#367)
- [FIX] CI: Fix pluggy error on py3.7 and running lint only in one build (#366)
- [IMP] sql-injection: Detect possible sql injections when using f-strings (#364)
- [FIX] Pinned lazy-object-proxy for Python 2.7 (#365)
- [FIX] missing-return: Incorrect check for tearDownClass (#362)
5.0.5
- [FIX] OdooChecker: Discard migrations folder as odoo main module (#358)
5.0.4
- Revert "[REVERT] requirements: Using pylint<2.11.0 because issue 5096 (#355)"
5.0.3
- [REVERT] requirements: Using pylint<2.11.0 because issue 5096 (#355)
5.0.2
- [REF] requirements: Upgrade pylint version 2.11.1 (#354)
5.0.1
- [REF] manifest-version-format: Add new valid odoo v15.0 (#353)
- [REF] sql-injection: No sql-injection using constants (#351)
- [FIX] sql-injection: AttributeError: 'NoneType' object has no attribute 'parent' (#350)
5.0.0
- [REF] requirements: Upgrade pylint version (#349)
4.0.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [ADD] dangerous-qweb-replace-wo-priority: Consider qweb view templates (#347)
- [ADD] context-overridden: Better using kwargs instead of dictionary (#256)
- [REF] invalid-name, unused-argument: Suppress check for migrations path (#348)
3.10.0
- [FIX] sql-injection: Fix false positives (#344)
- [FIX] pylint_odoo: Fix manifest_version_format option ignored (#346)
3.9.0
- [FIX] translation-required: Skip tests folder (#345)
- [FIX] xml-syntax-error: Fix crash if a xml has syntax errors (#343)
- [REF] pylint-odoo: Add .pylintrc example (#325)
- [FIX] attribute-deprecated: Check only "Model" class' attributes (#342)
- [FIX] attribute-string-redundant: "string" of related field is taken from the referenced one (#341)
- [FIX] file-not-used: Fix false positives on Windows (#335)
3.8.0
- [FIX] Add pbr to requirements (#328)
- [REF] requirements: upgrade pylint version (#320)
3.7.1
- [FIX] test-folder-imported: Support all import styles (#315)
- [FIX] misc.py: Properly support python namespace package when detecting the odoo addon directory (#317)
3.7.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [ADD] translation-positional-used: New check to valid the allow change the order of string formatting (#305)
- [ADD] str-format-used: Check if str.format was used in translated string (#304)
- [ADD] test-folder-imported: check if tests folder is imported in init file (#310)
3.6.0
- [FIX] requirements: fix dependencies break with pip 20.3 Fix #306 (#313)
- [ADD] add compatibility to v14.0 (#312)
3.5.1
- [REF] .travis.yml: Enable condition to deploy pypi
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [FIX] dangerous-view-replace-wo-priority: check all child tags with replace (#309)
- [ADD] pylint-odoo: add new check to maintainers key in manifest must be a list of str (#308)
- [REF] development-status-allowed: Explicitly report possible values (#301)
- [REF] odoo-addons-relative-import: does not apply in tests/ directory (#307)
- [REF] CI: Enable py3.8 and py3.9 (#294)
3.5.0
- [FIX] messages2rst: Compatible with more than 3 message items
- [REF] no-utf8-coding-comment,unnecessary-utf8-coding-comment: Using python version to enable/disable them (#292)
- [REF] po-msgstr-variables: Check if there is missing 'module:' comment (#291)
3.4.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- Fixing pragma: no cover position
- [ADD] po-msgstr-variables: Check if string translated can be parsed correctly
- [ADD] duplicate-po-message-definition, po-syntax-error: Enable PO checks
3.3.2
- [REF] missing-manifest-dependency: Add openupgradelib as a whitelist. (#288)
- [FIX] sql-injection: Consider valid arguments built with psycopg2.sql
3.3.1
- [REF] missing-import-error: Add new packages for Odoo v13.0
3.3.0
- [REF] requirements.txt: Update packages version (#285)
3.2.0
- [FIX] get_manifest_file: Get manifest file correctly
- [FIX] Visit module: manage odoo subdirectories Better way to check whether a path is a path of a subdirectoy of a Odoo module. Before, '/a/b/cc/d' was considered as a subdirectoy of '/a/b/c' because '/a/b/c' in '/a/b/cc/d' == True
3.1.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [FIX] rst_lint: Using UTF-8 encoding by default (#272)
- [ADD] Possibility of package name include dots
- [REF] .travis.yml: Using py3.7 stable instead of dev (#271)
- Improve incoherent-interpreter-exec-perm message
- Fix incompatibility with isort configuration file
- [FIX] rst-syntax-error: Using a 0 by default if line None is returned
3.0.3
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- Revert "[ADD] method-default prefix" (#254)
3.0.2
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [REF] CI: Fixing flake8, tests and clean requirements
- [REF] pylint_odoo: Supports odoo 13.0
- [ADD] method-default prefix
- [FIX] .travis.yml: Upgrade nvm version supported for eslint
- Allow console statements
- [ADD] print-used: Use _logger instead of print (#241)
3.0.1
- [FIX] AttributeError: 'MessagesStore' object has no attribute '_messages' related to https://github.com/PyCQA/pylint/commit/75cecdb1b88cc759223e83fd325aeafd09fec37e
- [IMP] added support Pylint 2.3.0 and Astroid 2.2.0
3.0.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [REF] sql-injection: Test private attributes (#226)
- [REF] tox: Upgrade new pylint for py3 (#215)
2.0.2
- [REF] manifest-required-authors: Support old deprecated parameter
2.0.1
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [DEL] require-jsdoc, keep require-valid-jsdoc
- [FIX]change the location of Guidelines URL
- [ADD] development-status-allowed: New check to verity valid development status Fix https://github.com/OCA/pylint-odoo/issues/199
- [REF] missing-import-error: Check enabled just for odoo <= 11.0
- Add fuzzy to ES globals
- Allow usage of `undefined` (#214)
- Jslint jsdoc relax (#209)
- [REF] pylint-odoo: Compatibility with python3.7 (#205)
- [IMP] file-not-used: Ignore unused files into the migrations directory (#213)
- [IMP] manifest-required-author: Allow multiple possible required authors
- [FIX] missing-manifest-dependency: Exclude tests directory
- [FIX] manifest-version-format: Don't ignore valid Odoo versions
- [FIX] requirements: Include "six" package (#207)
2.0.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [DOC] README.rst: Adding documentation to the way to skip one check based on the Odoo Version
- [REF] requirements: Bump requirements version
- Add _register_hook in "no missing return" methods (#201)
- [ADD] Add new lint to detect variables within translatable strings (#198)
- [FIX] translation-required: Fix some false positives (#196)
- [REF] .travis.yml: Allow both W503 and W504 formats (#197)
1.9.5
- [REF] .travis.yml: Just deploy a env and avoid cleanup before to deploy
1.9.4
- [REF] pylint_odoo: Increase coverage test
- [FIX] README.rst: Fix syntax and run check
- [FIX] don't complain about string attribute nodes in translation check
- [REF] javascript-lint: Allow to use moment (#189)
- Allow short ternary expressions
- [IMP] ESLint usability boost (#185)
- [REF] javascript-lint: Emit a message if there is internal error
- [REF] jslintrc: Use of property style for dot-location
- [REF] The method message_post need the subject and body be translatable
- [FIX] duplicate-xml-fields: Now consider as duplicated using domain and context values (#172)
1.9.3
- [REF] pylint_odoo: Use check-name instead of check-code for add_message method (#174)
- [FIX] pylint_odoo: Change the number of the appearances of the check (#173)
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [ADD] unnecessary-utf8-coding-comment: The utf8 comment is unnecessary if the version of odoo is 11.0 because use py3 (#168)
- [FIX] missing-external-dependency: Skip relative imports that starts with dot (#171)
- [ADD] character-not-valid-in-resource-link: To valid the character '?/#' into the in src/href link (#163)
- [REF] javascript-lint: Disable comma-dangle and prefer-rest-params checks
- [REF] .travis.yml: Freeze flake8 version In order to avoid false red if a new check is added
- [ADD] Add licence OEEL-1 into licence-allowed for module depending on Enterprise (#165)
- [ADD] xml-deprecated-qweb-directive: Deprecated QWeb directives (#157)
- [FIX] Add 11.0 as valid Odoo version
- [FIX] unicode error removing decode and use bytes with bytes - Open file with rb and use bytes with bytes - Use xml_special_char.xml: Use a special char to reproduce a decode error
1.8.2
- [REF] pylint_odoo: Support python3
1.8.1
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [FIX] deprecated-data-xml-node: Fix false negative with data/record + record for xml nodes (#156)
- [FIX] disable xml check: get method called when the method is not called directly (#154)
- [FIX] misc: TypeError argument of type 'NoneType' is not iterable (#150)
- [FIX] manifest-version-format: Use real dot from regex (#153)
- [FIX] manifest-version-format: Adds matching for string end to default manifest version format (#155)
- [ADD] xml-deprecated-tree-attribute: Implements check for deprecated tree attributes (#149)
- [REF] jslintrc: Disable prefer-spread
- [IMP] missing-return: Skip missing return if function is a generator (#147)
- [IMP] missing-return/required-super: setUpClass (#143)
- [IMP] missing-readme: Check for other supported file names (#140)
- [REF] jslintrc: Disable prefer-reflect error (#141)
- [REF] file-not-used: Consider as used the files referenced from report xml files (#138)
1.8.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [REF] cache: Cache other extension files just if is a odoo module (#142)
- [IMP] pylint_odoo: Skip pylint check on one xml file (#135)
- [ADD] website-manifest-key-not-valid-uri: For validate if the website into manifest is valid URI (#136)
1.7.0
- [REF] README: Auto-update Using pylint_odoo.messages2rst()
- [ADD] pylint_odoo: Adding new check resource-not-exist (#130)
- [FIX] fields: Validate a assign directly from root class (#116)
- [FIX] jslintrc: Remove deprecated ecmaFeatures key
- [ADD] pylint_odoo: Adding check detected tag inside tag and show warning (#129)
- [REF] Fix typo
- [REF] jslint: Enable no-comma-dangle check
- [IMP] sql-injection: support new cases and ignore some false positives (#122)
- [FIX] xml-attribute-translatable: Skip if version is different 8.0 (#117)
- [FIX] deprecated-module: Consider 'from openerp.osv.expression'
1.6.0
- [REF] README: Auto-update Using the following script: 'PYTHONPATH=~/odoo/pylint-odoo python -c "import pylint_odoo;print pylint_odoo.messages2rst()"'
- [REF] .travis.yml: Renamed flake8 error from F999 to F601 (#115)
- [FIX] Check file-not-used: Skip tests folders (#114)
- [FIX] incoherent-interpreter-exec-perm: Skip check for windows (#113)
- [ADD] except-pass: Emit message If a except:pass is used (#107)
- [FIX] attribute-string-redundant: Add "isinstance" validation for nodes
- [ADD] attribute-string-redundant: Check if "string" parameter is equal to variable name (#100)
- [ADD] renamed-field-parameter: Detect deprecated field values (digits_compute, select) (#99)
- [REF] javascript-lint: Use eslint instead of jshint (#97)
- [ADD] xml-attribute-translatable: Check XML attribute without translation parameter (#105)
- [REF] incoherent-interpreter-exec-perm: Better message (#106)
- [IMP] pylint-odoo: Adding support for parameters --ignore and --ignore-patterns (#103)
- [ADD] eval-referenced: Detects if a "eval" is referenced (without call it) (#101)
- [FIX] duplicate-xml-fields: False red using 2 tree sub-views *2M fields (#96)
- [FIX] method-NAME: Fix if value is not a string
- [REF] misc: Remove deprecated method
- [FIX] test: Never use global into test
1.5.0
- [REF] duplicate-xml-record-id: Get xml section from manifest to skip different origin (#89)
- [FIX] method-NAME: Fix case compute=None Fix OCA/pylint-odoo#88
1.4.0
- [REF] attribute-deprecated: Deprecate length class attribute (#86)
- [ADD] missing-return If you use call a `super` method then you will need return the original value. If you want overwrite a original method then you need add documentation of why and add a `pylint: disable=missing-return`
- [FIX] Whitelist `anybox.testing.openerp` * Add `anybox.testing.openerp` - Fixes #81
- [FIX] manifest-version-format: Fix regex to use explicit dot instead of any char
- [FIX] manifest-version-format: Support -e manifest-version-format only
- [FIX] missing-import-error: Updating libraries used from requirements.txt but not imported or nested imported from odoo
- [IMP] manifest-version-format: Add valid_odoo_versions parameter to force a valid version of odoo in the manifest version
- [REF] missing-import-error: Skip test file since these files are loaded only when running tests and in such a case your module and their external dependencies are installed
- [ADD] Support for 10.0 manifest name
- [REF] requirements: Update developer version of pylint and astroid
1.3.5
- Adding isort dependency (#70)
1.3.4
- [REF] README: Update messages list
1.3.3
- [ADD] missing-import-error, missing-manifest-dependency
- [FIX] rst-syntax-error: Skip unknown roles
- [FIX] rst-syntax-error: Skip unknown directives
- [REF] global refactoring: better message output and use real file and line number in non-py files (#62)
- [REF] README: Add examples special folder
- [REF] checkers: Skip example folder to check lints
1.3.2
- [REF] README: Update messages list
1.3.1
- [ADD] file-not-used: Emit message if there are xml, yml, sql or csv files but It isn't referenced from manifest (#53)
- [ADD] dangerous-view-replace-wo-priority: Check dangerous view with replace but defined with low priority (#55)
- [ADD] old-api7-method-defined: Emit message if the method defined have (self, cr, uid) (#52)
- [ADD] odoo-addons-relative-import (#56)
- [REF] tox: Freeze stable sha pylint20
- [FIX] consider-merging-classes-inherited: Skip check if has '_name' and fix when you use '_inherit' name out of class attribute . Add more tests
- [REF] missing-newline-extrafiles: Skip lib folder
- [FIX] consider-merging-classes-inherited: Fix leaving module isn't a good idea. Better close method
- [IMP] consider-merging-classes-inherited: Support disable comment
- [REF] consider-merging-classes-inherited: Use assign node and better message
- [ADD] consider-merging-classes-inherited
- [REF] Increase performance
- [IMP] pylint_odoo: Enable cProfile print stats
- [IMP] deprecated-module: Add exception for the case of valid openerp.osv.expression (#40)
- [IMP] sql-injection: Add compatibility with .format (#44)
- [REF] translation-required: 100% coverage
- [IMP] translation-required: Support % strings
- [IMP] translation-required: Support .format
- [FIX] translation-required: Fix AttributeError 'Getattr' object has no attribute 'name'
- [IMP] translation-required: Just check odoo exceptions
- [FIX] odoolint: Remove unsafe eval and reduce mccabe rate
1.3.0
- [REF] README: Add new checks (#36)
- [FIX] duplicate-xml-fields: Support security xml style (#35)
- [ADD] sql-injection: Add new check to avoid sql injection (#29)
- [FIX] missing-newline-extrafiles: Fix 'IOError: [Errno 22] Invalid argument' by files of size 2 (#37)
- [REF] README: Add new checks
- [ADD] method-param: Check param method starts with "_param_" (#33)
- [FIX] join_node_args_kwargs: AttributeError (#30)
- [REF] duplicate-id-csv: Better message of error - Message before: Duplicate id id_example1 in ir.model.access.csv file - Message now: security/ir.model.access.csv duplicated id id_example1
- [REF] javascript-lint: Ignore /lib/ subfolder
- [ADD] invalid-commit: Add new check invalid-commit - Verify the guideline https://github.com/oca/maintainer-tools/blob/master/CONTRIBUTING.md#never-commit-the-transaction
1.2.0
- [REF] README.rst: Updating new checks
- [IMP] test: Add tox for multi-environment and add compatiblity with latest version
- [ADD] translation-required: Add check to required even a translation (#23)
- [IMP] Add pylint check missing newline in extra extension files
- [IMP] test: Add tox for multi-environment and add compatiblity with latest version
- [IMP] Add Check tabs identation instead of four spaces
- better_msg
- merge
- [REF] test: better way to identify check error expected
- [IMP] Add check Duplicate field in xml record (#20)
- [IMP] Add pylint check Redundant module name reference in xml_id
- [IMP] pylint_odoo: Add check duplicate ids in ir.model.access.csv files
- [IMP] pylint_odoo: Add check for manifest-version-format
- [FIX] OCA/MQT#302: Use of astroid version 1.3.8
1.1.0
- [FIX] setup: Build ChangeLog file
- [ADD] Add check 'deprecated-openerp-xml-node'
- [ADD] ChangeLog: Empty file to support auto build
- [FIX] Change _fields by _columns
- [REF] Fix typo
- [IMP] Add check 'create-user-without-reset-password'
- [IMP] Support odoo tag in xml file
- [REF] Support of 'noupdate' in check 'duplicate-xml-record-id'
- [REF] setup.cfg: Enable ChangeLog
- [REF] README: Add new message manifest-author-string
1.0.2
- check that author is a string
1.0.1
- [REF] Migrate md to rst
1.0.0
- [IMP] .travis.yml: Enable auto deploy of pypi package from travis
- [ADD] pylint_odoo: Add main package
- [ADD] .gitignore: Add file gitignore for first commit
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
Hashes for pylint_odoo-9.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98cf34220064db3d956c7aa9343818b5e62ca462bc07297b17b0b9192eb51b5 |
|
MD5 | 66a06283c10879cce413e30f82251d1f |
|
BLAKE2b-256 | 5707ba124b35b9914a4f553a01ea7939a09cf1aa60405cadd773c1a88497d627 |