diff options
author | Gabor Kelemen <kelemeng@ubuntu.com> | 2022-04-18 14:54:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-04-25 08:43:38 +0200 |
commit | 655e5d4406e15774a76c945a57700d21516813c1 (patch) | |
tree | 65b54e90c906b09304f18add7e81318dc908a726 /bin | |
parent | 45aac5b97192a97369c7785772ce7400d9ea8abc (diff) |
find-unneeded-includes: bail out early if no files are found with --recursive
Change-Id: I5bd726b33e4fc7068baad91ff185763274307b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133308
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/find-unneeded-includes | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/find-unneeded-includes b/bin/find-unneeded-includes index f58677c48bb7..cc694fcb41a6 100755 --- a/bin/find-unneeded-includes +++ b/bin/find-unneeded-includes @@ -346,6 +346,13 @@ def main(argv): # quickly sanity check whether files with exceptions in yaml still exists # only check for the module of the very first filename passed + + # Verify there are files selected for checking, with --recursive it + # may happen that there are in fact no C/C++ files in a module directory + if not list_of_files: + print("No files found to check!") + sys.exit(-2) + moduleName = sorted(list_of_files)[0].split("/")[0] rulePath = os.path.join(moduleName, "IwyuFilter_" + moduleName + ".yaml") moduleRules = {} |