From 9f3840567c59a7980a22d6e0a02fcddbb23ab4f9 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Tue, 5 Sep 2017 13:20:12 +0300 Subject: [PATCH 1/2] [FIX] manifest-version-format: Adds matching for string end to default manifest version format Issue #152 --- pylint_odoo/checkers/no_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint_odoo/checkers/no_modules.py b/pylint_odoo/checkers/no_modules.py index 9883903e..b175174b 100644 --- a/pylint_odoo/checkers/no_modules.py +++ b/pylint_odoo/checkers/no_modules.py @@ -234,7 +234,7 @@ DFTL_VALID_ODOO_VERSIONS = [ '4.2', '5.0', '6.0', '6.1', '7.0', '8.0', '9.0', '10.0' ] -DFTL_MANIFEST_VERSION_FORMAT = r"(%(valid_odoo_versions)s)\.\d+\.\d+\.\d+" +DFTL_MANIFEST_VERSION_FORMAT = r"(%(valid_odoo_versions)s)\.\d+\.\d+\.\d+$" DFTL_CURSOR_EXPR = [ 'self.env.cr', 'self._cr', # new api 'self.cr', # controllers and test From 90700ff7c8452cc0ae6ec1b0e4ebc1322b6f76b2 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Tue, 5 Sep 2017 18:17:25 +0300 Subject: [PATCH 2/2] [ADD] manifest-version-format: Adds a test case with extra text at the end of module version --- pylint_odoo/test/main.py | 2 +- pylint_odoo/test_repo/broken_module3/__openerp__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylint_odoo/test/main.py b/pylint_odoo/test/main.py index e64a4767..fcd3919d 100644 --- a/pylint_odoo/test/main.py +++ b/pylint_odoo/test/main.py @@ -35,7 +35,7 @@ 'manifest-deprecated-key': 1, 'manifest-required-author': 1, 'manifest-required-key': 1, - 'manifest-version-format': 2, + 'manifest-version-format': 3, 'method-compute': 1, 'method-inverse': 1, 'method-required-super': 8, diff --git a/pylint_odoo/test_repo/broken_module3/__openerp__.py b/pylint_odoo/test_repo/broken_module3/__openerp__.py index 1b110e9c..1eb7f4f4 100644 --- a/pylint_odoo/test_repo/broken_module3/__openerp__.py +++ b/pylint_odoo/test_repo/broken_module3/__openerp__.py @@ -4,7 +4,7 @@ 'license': 'AGPL-3', 'author': ['Other', 'Odoo Community Association (OCA)'], # expected string 'website': 'htt://odoo-community.com', - 'version': '8.0.1.0.0', + 'version': '8.0.1.0.0foo', 'depends': ['base'], 'data': [], 'test': [],