Skip to content

Commit cf5cad6

Browse files
committed
Warn if no files found in a compilation database
Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 81c0bf4 commit cf5cad6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

codebasin/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,12 @@ def load_database(dbpath, rootdir):
495495
else:
496496
log.warning("Couldn't find file %s -- ignoring it.", path)
497497

498+
if len(configuration) == 0:
499+
log.warning(
500+
f"No files found in compilation database at '{dbpath}'.\n"
501+
+ "Ensure that 'directory' and 'file' are in the root directory.",
502+
)
503+
498504
return configuration
499505

500506

0 commit comments

Comments
 (0)