From 72f132b8fb9f2a47b0f723f4dc4eaa4fdb0c45bd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 23 Apr 2025 08:22:28 +0200 Subject: dev: Improve makefile, add BTB_POSIX, and BTB_WINDOWS macro. - Refactor library code for better maintenance. - Improve code quality by using well known macros for status code. - Don't let the CLI pass when '-' is being passed as argument and is not recognized. Signed-off-by: Amlal El Mahrouss --- format.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 format.sh (limited to 'format.sh') diff --git a/format.sh b/format.sh new file mode 100755 index 0000000..f36943c --- /dev/null +++ b/format.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +THIS_PATH="$(realpath "$0")" +THIS_DIR="$(dirname "$THIS_PATH")" + +FILE_LIST="$(find "$THIS_DIR" | grep -E ".*(\.cc|\.c|\.h|\.inl)$")" + +echo -e "Files found to format = \n\"\"\"\n$FILE_LIST\n\"\"\"" + +clang-format --verbose -i --style=file $FILE_LIST -- cgit v1.2.3