From f48249ede8952682249b9e137178bf51e44b21e5 Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Sun, 17 May 2020 17:53:14 +0200 Subject: [PATCH] Error out if no files given It is usually an error to run this with no matching files, so print a message and exit with an error code --- run-clang-format.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run-clang-format.py b/run-clang-format.py index 395304e..53d7528 100755 --- a/run-clang-format.py +++ b/run-clang-format.py @@ -329,7 +329,8 @@ def main(): extensions=args.extensions.split(',')) if not files: - return + print_trouble(parser.prog, 'No files found', use_colors=colored_stderr) + return ExitStatus.TROUBLE njobs = args.j if njobs == 0: