diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-18 11:35:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-19 09:52:32 +0100 |
commit | c51cfaf48d3b12a19b01e824b6ba4230376bcad4 (patch) | |
tree | 8861ebc1182642f4f9be5118df13740855be90a4 /lib/bb/data.py | |
parent | b2017f493ab730d804ae44ec5a168d464626d046 (diff) | |
download | bitbake-contrib-c51cfaf48d3b12a19b01e824b6ba4230376bcad4.tar.gz |
bitbake: Warn upon finding tab indentation in python functions
Mixed spacing in python functions can cause subtle issues and
generally confuses users. We've standardised on 4 space indentation,
adding this warning helps ensure consistency and avoid bugs. It
also makes _prepend and _append operations on python functions slightly
less risky.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
-rw-r--r-- | lib/bb/data.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/data.py b/lib/bb/data.py index e3ffefeb3..5b7a092a2 100644 --- a/lib/bb/data.py +++ b/lib/bb/data.py @@ -291,6 +291,8 @@ def build_dependencies(key, keys, shelldeps, vardepvals, d): if d.getVarFlag(key, "python"): parsedvar = d.expandWithRefs(value, key) parser = bb.codeparser.PythonParser(key, logger) + if parsedvar.value and "\t" in parsedvar.value: + logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True))) parser.parse_python(parsedvar.value) deps = deps | parser.references else: |