utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
The CommentsMenusPackagesOrder test is broken in various ways for files other than package/Config.in and package/Config.in.host. Therefore, the script gives bogus errors for various other Config.in files.
However, we don't really want to check those other files. Indeed, many of them have a non-alphabetical ordering for good reasons.
Therefore, skip the check for files other than package/Config.in and package/Config.in.host.
--- utils/checkpackagelib/lib_config.py | 5 +++++ 1 file changed, 5 insertions(+)
utils/checkpackagelib/lib_config.py +5 -0
@@ -72,6 +72,11 @@ class CommentsMenusPackagesOrder(_CheckFunction): return len(self.state.split('-')) - 1 def check_line(self, lineno, text): + # We only want to force sorting for the top-level menus + if self.filename not in ["package/Config.in", + "package/Config.in.host"]: + return + if text.startswith("comment") or text.startswith("if") or \ text.startswith("menu"):
Signature · 1 line
2.21.0
PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
Arnout, All,
On 2019-08-01 01:02 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
Quoted 11 lines
The CommentsMenusPackagesOrder test is broken in various ways for files other than package/Config.in and package/Config.in.host. Therefore, the script gives bogus errors for various other Config.in files.
However, we don't really want to check those other files. Indeed, many of them have a non-alphabetical ordering for good reasons.
Therefore, skip the check for files other than package/Config.in and package/Config.in.host.
Regards,
Yann E. MORIN.
Quoted 26 lines
Cc Jerzy Grzegorek <[email protected]>Cc Yann E. MORIN <[email protected]>--- utils/checkpackagelib/lib_config.py | 5 +++++ 1 file changed, 5 insertions(+)utils/checkpackagelib/lib_config.py +5
-0@@ -72,6 +72,11 @@ class CommentsMenusPackagesOrder(_CheckFunction): return len(self.state.split('-')) - 1 def check_line(self, lineno, text): + # We only want to force sorting for the top-level menus + if self.filename not in ["package/Config.in", + "package/Config.in.host"]: + return + if text.startswith("comment") or text.startswith("if") or \ text.startswith("menu"):Signature · 1 line
2.21.0
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 utils/checkpackagelib: CommentsMenusPackagesOrder: only apply to top-level
In reply to Arnout Vandecappelle (Essensium/Mind)Hi Arnout,
Quoted 11 lines
The CommentsMenusPackagesOrder test is broken in various ways for files other than package/Config.in and package/Config.in.host. Therefore, the script gives bogus errors for various other Config.in files.
However, we don't really want to check those other files. Indeed, many of them have a non-alphabetical ordering for good reasons.
Therefore, skip the check for files other than package/Config.in and package/Config.in.host.
Sorry for the late response (holidays).
I send a patch to solve those issues.
http://lists.busybox.net/pipermail/buildroot/2019-July/254549.html
Could you please comment it ?
Regards,
Jerzy
Quoted 24 lines
Cc Jerzy Grzegorek <[email protected]>Cc Yann E. MORIN <[email protected]>--- utils/checkpackagelib/lib_config.py | 5 +++++ 1 file changed, 5 insertions(+)utils/checkpackagelib/lib_config.py +5
-0@@ -72,6 +72,11 @@ class CommentsMenusPackagesOrder(_CheckFunction): return len(self.state.split('-')) - 1 def check_line(self, lineno, text): + # We only want to force sorting for the top-level menus + if self.filename not in ["package/Config.in", + "package/Config.in.host"]: + return + if text.startswith("comment") or text.startswith("if") or \ text.startswith("menu"):