Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: recipe_engine/lint_test.py

Issue 1344583003: Recipe package system. (Closed) Base URL: git@github.com:luci/recipes-py.git@master
Patch Set: Recompiled proto Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/loader.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/lint_test.py
diff --git a/recipe_engine/lint_test.py b/recipe_engine/lint_test.py
old mode 100755
new mode 100644
index 247d685c36eb0af5f8698e335f8a68dc40d9d473..5e95e04740826d973f835047df1d28fc21e92eaa
--- a/recipe_engine/lint_test.py
+++ b/recipe_engine/lint_test.py
@@ -12,6 +12,7 @@ e.g. you can run a recipe simulation for a Windows recipe on Linux.
# TODO(luqui): Implement lint for recipe modules also.
+from __future__ import absolute_import
import re
import os
import sys
@@ -23,6 +24,7 @@ MODULES_WHITELIST = [
r'collections',
r'contextlib',
r'datetime',
+ r'itertools',
r'json',
r'math',
r're',
@@ -58,8 +60,12 @@ def ImportsTest(recipe_path, recipe_name, whitelist, universe):
(recipe_path, module_name))
-def main(universe, whitelist=[]):
+def main(package_deps, whitelist=[]):
+ from . import loader
+ from . import package
+
whitelist = map(re.compile, MODULES_WHITELIST + whitelist)
+ universe = loader.RecipeUniverse(package_deps)
errors = []
for recipe_path, recipe_name in universe.loop_over_recipes():
« no previous file with comments | « recipe_engine/doc.py ('k') | recipe_engine/loader.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698