@@ -1,3 +1,5 @@
+# check-package Indent_ignore-menu-indent-below
+
menu "Target packages"
source "package/busybox/Config.in"
@@ -1,3 +1,5 @@
+# check-package Indent_ignore-menu-indent-below
+
menu "Host utilities"
source "package/abootimg/Config.in.host"
@@ -1,3 +1,5 @@
+# check-package Indent_ignore-menu-indent-below
+
config BR2_PACKAGE_KODI_ARCH_SUPPORTS
bool
default y if BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS
@@ -1,3 +1,5 @@
+# check-package Indent_ignore-menu-indent-below
+
menuconfig BR2_PACKAGE_XORG7
bool "X.org X Window System"
depends on BR2_USE_WCHAR
@@ -187,6 +187,7 @@ class HelpText(_CheckFunction):
class Indent(_CheckFunction):
+ flags = ["ignore-menu-indent-below"]
ENDS_WITH_BACKSLASH = re.compile(r"^[^#].*\\$")
entries_that_should_be_indented = [
"bool", "default", "depends", "help", "prompt", "select", "string"]
@@ -224,11 +225,8 @@ 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"]:
+ # some Config.in files have a special but legitimate indentation rule
+ if self.enabled_flags["ignore-menu-indent-below"]:
return
return ["{}:{}: should not be indented"
.format(self.filename, lineno),