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 5 forks source link

Allow to define directory to check via command line argument #135

Closed frisi closed 8 years ago

frisi commented 9 years ago

currently this recipe only allows to define the directory to check via an option in the buildout configuration:

[code-analysis]
recipe = plone.recipe.codeanalysis
directory =  ${buildout:directory}/src
imports = True

when working on customer projects i usually have several packages under the src directory. customer.theme, customer.site, and several collective.* and Products.* packages i need to extend/adapt. before touching these packages, one should run code-analysis and fix errors - if any. to not get overwhelmed by errors of all the other packages currently in src/ folder on currently needs to define a separate part for code analysis for this package:

[code-analysis-somepackage]
<= code-analysis
directory =  ${buildout:directory}/src/some.package

it would be a nice feature to allow to limit the directory given in the buildout part further via a command line argument bin/code-analyisis -d some.package or bin/code-analysis -d src/some.package

hvelarde commented 9 years ago

+1 on this; I've been thinking… can't we just read this information somehow using the pkg_resources module?

tisto commented 9 years ago

+1