[Buildroot] [PATCH 1/2] utils/check-package: allow exception for global checks

Arnout Vandecappelle arnout at mind.be
Sat Oct 7 20:36:32 UTC 2023


check-package has a mechanism for a specific file to make an exception
to a specific checker, by preceding the offending line with
"check-package ... <checker class>". However, this is not possible for
the global checks that are done in the checker's after() function.

Allow exceptions for the global checks by writing the same
"check-package ... <checker class>" comment on the last line of the
file.

Signed-off-by: Arnout Vandecappelle <arnout at mind.be>
---
 utils/check-package | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/utils/check-package b/utils/check-package
index 105902303e..38119f7136 100755
--- a/utils/check-package
+++ b/utils/check-package
@@ -247,6 +247,8 @@ def check_file_using_lib(fname):
             lastline = text
 
     for name, cf in objects:
+        if cf.disable.search(lastline):
+            continue
         warn, fail = print_warnings(cf.after(), name in xfail)
         if fail > 0:
             failed.add(name)
-- 
2.41.0




More information about the buildroot mailing list