Skip to content

Commit

Permalink
Warn if no files found in a compilation database
Browse files Browse the repository at this point in the history
Signed-off-by: John Pennycook <john.pennycook@intel.com>
  • Loading branch information
Pennycook committed Mar 7, 2024
1 parent 81c0bf4 commit cf5cad6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions codebasin/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,12 @@ def load_database(dbpath, rootdir):
else:
log.warning("Couldn't find file %s -- ignoring it.", path)

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

return configuration


Expand Down

0 comments on commit cf5cad6

Please sign in to comment.