From 90533b689941cfd92da9e1a2a1ed6c1b7246b25e Mon Sep 17 00:00:00 2001 From: Arnout Vandecappelle Date: Sat, 7 Oct 2023 22:36:32 +0200 Subject: [PATCH] utils/check-package: allow exception for global checks 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 ... ". 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 ... " comment on the last line of the file. Signed-off-by: Arnout Vandecappelle Signed-off-by: Arnout Vandecappelle --- utils/check-package | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/check-package b/utils/check-package index 8781d21d8f..aa10280f4d 100755 --- a/utils/check-package +++ b/utils/check-package @@ -276,6 +276,8 @@ def check_file_using_lib(fname): return nwarnings, nlines 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)