From: hvelarde <je...@pl...> - 2013-07-27 17:14:27
|
Repository: plone.recipe.codeanalysis Branch: refs/heads/master Date: 2013-07-27T10:13:22-07:00 Author: hvelarde (hvelarde) <hec...@gm...> Commit: https://github.com/plone/plone.recipe.codeanalysis/commit/151d4ab4c1b9c18e8a5942c116aad70df4f33075 Merge branch 'zptlint-part' of https://github.com/gforcada/plone.recipe.codeanalysis into gforcada-zptlint-part Conflicts: README.rst Files changed: M README.rst M buildout.cfg M plone/recipe/codeanalysis/__init__.py diff --git a/README.rst b/README.rst index c83baad..e8f52ce 100644 --- a/README.rst +++ b/README.rst @@ -79,7 +79,7 @@ The recipe supports the following options: configuration is needed. **zptlint-bin** - Set the path to a custom version of zptlint. Defaults to ``bin/zptlint``. + Set the path to a custom version of zptlint. Default is ``bin/zptlint``. **deprecated-methods** If set to True, warnings about deprecated methods will be printed. Default diff --git a/buildout.cfg b/buildout.cfg index 960fbab..f5628c1 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -3,6 +3,7 @@ develop = . parts = test code-analysis + zptlint versions = versions [test] @@ -29,6 +30,10 @@ string-formatting = True imports = True debug-statements = True +[zptlint] +recipe = zc.recipe.egg +eggs = zptlint + [versions] setuptools = 0.6c11 distribute = 0.6.49 diff --git a/plone/recipe/codeanalysis/__init__.py b/plone/recipe/codeanalysis/__init__.py index c63a2c6..95c5cf0 100644 --- a/plone/recipe/codeanalysis/__init__.py +++ b/plone/recipe/codeanalysis/__init__.py @@ -40,7 +40,10 @@ def __init__(self, buildout, name, options): self.options.setdefault('csslint-bin', 'csslint') # ZPT Lint self.options.setdefault('zptlint', 'False') - self.options.setdefault('zptlint-bin', 'zptlint') + zptlint_path = os.path.join( + self.buildout['buildout']['bin-directory'], 'zptlint' + ) + self.options.setdefault('zptlint-bin', zptlint_path) # Warn about usage of deprecated methods self.options.setdefault('deprecated-methods', 'False') # utf-8 header |