plone / plone.recipe.codeanalysis

provides static code analysis for Buildout-based Python projects, including flake8, JSHint, CSS Lint, and other code checks
https://pypi.org/project/plone.recipe.codeanalysis/
11 stars 8 forks source link

<?python import pdb; pdb.set_trace() ?> tags in pt #202

Open ale-rt opened 7 years ago

ale-rt commented 7 years ago

The validation should fail if we have <?python import pdb; pdb.set_trace() ?> inside pts. Maybe also if we have <?python(.*)?>.

ale-rt commented 7 years ago

What do you think? If I have some pointer I can also try to implement this check.

gforcada commented 7 years ago

@ale-rt you could first put it in https://github.com/plone/plone.recipe.codeanalysis/blob/master/plone/recipe/codeanalysis/zptlint.py so that you already have the boilerplate to get only the specific files, then on top of calling zptlint you will do your search for pdbs there...

If it start growing we can split into another tool and just call it... maybe zptlint could be improved to check that as well? Although it seems quite unmaintained...

gforcada commented 7 years ago

I see @avoinea made some improvements on their fork: https://github.com/eea/zptlint/commit/2facd438582b00ae98846ccfa794e724af432bfa maybe we could contact zptlint pypi maintainers and ask them to get plone/collective pypi username rights there so it can be further developed? Any one with interest on it?