aboutsummaryrefslogtreecommitdiff
path: root/utils/checkpackagelib
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-04-01 02:08:49 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-01 10:16:21 +0200
commit73dcbc19e9eb5a0c829ed7ee488ca4eaba17e337 (patch)
tree6c8e0a04289b6d2af39cb9ed3890e85597560226 /utils/checkpackagelib
parent3ff0728480f4b9b5e1ba36537960f107f274b4b7 (diff)
downloadbuildroot-73dcbc19e9eb5a0c829ed7ee488ca4eaba17e337.tar.gz
buildroot-73dcbc19e9eb5a0c829ed7ee488ca4eaba17e337.tar.bz2
utils/checkpackagelib: exclude four files from Config.in indentation check
package/Config.in, package/Config.in.host, package/x11r7/Config.in and package/kodi/Config.in do not comply with the normal Config.in indentation rules. However, this violation of the rule is legitimate, so let's skip them in check-package for this specific indentation check. This removes the last 2197 remaining warnings on Config.in files. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Ricardo: rebase patch to use relative paths passed by the main script, fix flake8 warnings, add package/Config.* to the list] Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'utils/checkpackagelib')
-rw-r--r--utils/checkpackagelib/lib_config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/checkpackagelib/lib_config.py b/utils/checkpackagelib/lib_config.py
index 11d885f8c7..1d273f1c5f 100644
--- a/utils/checkpackagelib/lib_config.py
+++ b/utils/checkpackagelib/lib_config.py
@@ -132,6 +132,12 @@ class Indent(_CheckFunction):
text]
elif entry in entries_that_should_not_be_indented:
if not text.startswith(entry):
+ # four Config.in files have a special but legitimate indentation rule
+ if self.filename in ["package/Config.in",
+ "package/Config.in.host",
+ "package/kodi/Config.in",
+ "package/x11r7/Config.in"]:
+ return
return ["{}:{}: should not be indented"
.format(self.filename, lineno),
text]