utils/check-package: emit library name along with check function name

Currently, when we generate .checkpackageignore, we store, for each
error, only the name of the function that generated that error.

Although we currently do not have two check libs that have same-name
check functions, there is nothing that would prevent that, and there
is no reason why two unrelated libs could not implement checks with
the same name.

If such a situation were to arise, we'd have no way, when parsing the
ignore list (in-tree: .checkpackageignore), to know which of the libs
the exclusion would apply to.

Fix that by storing both the library and function names together. The
leading "checkpackagelib." (with the trailing dot, 16 chars) is removed
for brevity, because it's present in all libs' names.

As a consequence, regenerate .checkpackageignore.

Note: people using that script to validate their br2-external trees will
also have to regenerate their own exclusion list if they have one.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@datacom.com.br>
Reviewed-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
Yann E. MORIN 2024-03-31 19:26:06 +02:00
parent 9cb421c16f
commit ccb4e5db5c
2 changed files with 1342 additions and 1342 deletions

File diff suppressed because it is too large Load Diff

View File

@ -224,7 +224,7 @@ def check_file_using_lib(fname):
print("{}: would run: {}".format(fname, functions_to_run))
return nwarnings, nlines
objects = [[c[0], c[1](fname, flags.manual_url)] for c in internal_functions]
objects = [[f"{lib.__name__[16:]}.{c[0]}", c[1](fname, flags.manual_url)] for c in internal_functions]
for name, cf in objects:
warn, fail = print_warnings(cf.before(), name in xfail)