Vauxoo / pylint-odoo

1 stars 4 forks source link

[IMP] pylint-odoo: Adding support for parameters --ignore and --ignore-patterns #103

Closed JesusZapata closed 7 years ago

JesusZapata commented 7 years ago

pylint supports the following parameters:

But pylint-odoo is not using for ignore them from custom search files methods. We are searching files: js, md, rst... And we need skip them too if this parameters is defined.

Doubts you have:

Related to issue #102

moylop260 commented 7 years ago

Yeah Its right. The idea is use the same parameter of pylint.

El 06/01/2017 8:58 a.m., "Jesus Zapata" notifications@github.com escribió:

@JesusZapata commented on this pull request.

In pylint_odoo/checkers/modules_odoo.py https://github.com/Vauxoo/pylint-odoo/pull/103#pullrequestreview-15500658 :

@@ -237,6 +237,20 @@ class ModuleChecker(misc.WrapperModuleChecker): 'javascript lint. You can use the environment variable ' '"PYLINT_ODOO_JSLINTRC" too. Default: %s' % DFTL_JSLINTRC) }),

  • ('po-ignore', {

I try to use --ignore but enter in conflict with ignore of pylint It is a good solucion?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Vauxoo/pylint-odoo/pull/103#pullrequestreview-15500658, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVh27phRqZHWzmd3bxVt1K0h83sqhpNks5rPlaLgaJpZM4Lb9ja .

JesusZapata commented 7 years ago

Now used the correct parameters --ignore and --ignore-patterns !

JesusZapata commented 7 years ago

I made test into the folder /tmp attached screenshot

Firts all deprecated-openerp-xml-node deprecated-openerp-xml-node

Second parameter --ignore deprecated-openerp-xml-node-ignore

Third parameter --ignore-patterns enable deprecated-openerp-xml-node-ignore-patterns

Is good idea used deprecated-openerp-xml-node for test this functionality ?

moylop260 commented 7 years ago

Maybe is working the original parameter, because you are skipping a full folder. You should try with a particular file.

And remove the following line: base_path = os.path.dirname(os.path.realpath(__file__))

JesusZapata commented 7 years ago

@moylop260 Thanks for you observation! The previous code did not find the files

JesusZapata commented 7 years ago

@moylop260 What else does it take to close this PR?

moylop260 commented 7 years ago

Please create PR to oca from merged sha

JesusZapata commented 7 years ago

Done the PR https://github.com/OCA/pylint-odoo/pull/103