diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..468ceea --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +BasedOnStyle: LLVM \ No newline at end of file diff --git a/Makefile b/Makefile index 7365e3a..1e82a74 100644 --- a/Makefile +++ b/Makefile @@ -1044,16 +1044,16 @@ ALL_SOURCE = $(shell find . \( -type f \( -name '*.c' -o -name '*.cpp' \) \) ) style: @for src in $(ALL_SOURCE) $(ALL_INCLUDES); do \ echo "Formatting $$src..." ; \ - clang-format -style=llvm -i "$$src" ; \ + clang-format -i "$$src" ; \ done @echo "Done" check-style: @for src in $(ALL_SOURCE) $(ALL_INCLUDES) ; do \ - var=`clang-format -style=llvm "$$src" | diff "$$src" - | wc -l` ; \ + var=`clang-format "$$src" | diff "$$src" - | wc -l` ; \ if [ $$var -ne 0 ] ; then \ echo "$$src does not respect the coding style (diff: $$var lines)" ; \ - clang-format -style=llvm "$$src" | diff "$$src" -; \ + clang-format "$$src" | diff "$$src" -; \ exit 1 ; \ fi ; \ done