From d7897e8532e659037434314bea00ad21afadcd02 Mon Sep 17 00:00:00 2001
From: Rahix <rahix@rahix.de>
Date: Mon, 8 Jul 2019 23:57:49 +0200
Subject: [PATCH] fix(code-style): Error if no sources given

Signed-off-by: Rahix <rahix@rahix.de>
---
 tools/code-style.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/code-style.sh b/tools/code-style.sh
index ee1cd11e..b18533bd 100755
--- a/tools/code-style.sh
+++ b/tools/code-style.sh
@@ -12,6 +12,11 @@ if ! command -v python3 >/dev/null 2>&1; then
     exit 127
 fi
 
+if [ "$#" == 0 ]; then
+    echo "usage: $0 <source.c> ..."
+    exit 1
+fi
+
 script_dir="$(dirname "$0")"
 
 for source_file in "$@"; do
-- 
GitLab