check_whence: error on directory listed as File

No occurrences in-tree, but it makes sense to sanity check that.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
This commit is contained in:
Emil Velikov 2023-03-01 18:56:21 +00:00 committed by Josh Boyer
parent 05183b7bd5
commit 6c9e0ed536
No known key found for this signature in database
GPG Key ID: A31B6BD72486CFD6
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ def main():
known_prefixes = set(name for name in whence_list if name.endswith('/'))
git_files = set(list_git())
for name in set(name for name in whence_files if name.endswith('/')):
sys.stderr.write('E: %s listed in WHENCE as File, but is directory\n' %
name)
ret = 1
for name in set(fw for fw in whence_files if whence_files.count(fw) > 1):
sys.stderr.write('E: %s listed in WHENCE twice\n' % name)
ret = 1