summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-11-23 19:13:44 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 13:04:54 +0000
commitf7060a43995279723036c37d173f846a3613180e (patch)
tree1ca51dba885c34c24d04addde9854b25de26c4b7 /bitbake/lib/bb/data.py
parenteff9942d30c34a8290fa3ff5edafe32a8992c633 (diff)
downloadpoky-f7060a43995279723036c37d173f846a3613180e.tar.gz
bitbake: bitbake: BBHandler: Check tab indentation for python code
The previous check was in data.py which only can check code like "python funcname()" in the dependency chain, but there are 3 kinds of python functions: - python() - def py_funcname() - python funcname() Add the checking to BBHandler to check and warn for all of them. The warning looks like: WARNING: /path/to/recipes-core/busybox/busybox_1.29.2.bb: python should use 4 spaces indentation, but found tabs in busybox.inc, line 75 (Bitbake rev: 0cdc5b81fc1f5e5281a525a657e420ebc3bb9e90) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data.py')
-rw-r--r--bitbake/lib/bb/data.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py
index d66d98cc8b..6bcfcf46cc 100644
--- a/bitbake/lib/bb/data.py
+++ b/bitbake/lib/bb/data.py
@@ -322,8 +322,6 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d):
322 if varflags.get("python"): 322 if varflags.get("python"):
323 value = d.getVarFlag(key, "_content", False) 323 value = d.getVarFlag(key, "_content", False)
324 parser = bb.codeparser.PythonParser(key, logger) 324 parser = bb.codeparser.PythonParser(key, logger)
325 if value and "\t" in value:
326 logger.warning("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE")))
327 parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno")) 325 parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno"))
328 deps = deps | parser.references 326 deps = deps | parser.references
329 deps = deps | (keys & parser.execs) 327 deps = deps | (keys & parser.execs)