diff --git a/Makefile b/Makefile index d2fc8e287..da8248964 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ clean: clean-extension # apply or check style reindent: - cd ${citus_abs_top_srcdir} && citus_indent --quiet + ${citus_abs_top_srcdir}/ci/fix_style.sh check-style: cd ${citus_abs_top_srcdir} && citus_indent --quiet --check .PHONY: reindent check-style diff --git a/ci/fix_style.sh b/ci/fix_style.sh new file mode 100755 index 000000000..ce0d93a38 --- /dev/null +++ b/ci/fix_style.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# fail if trying to reference a variable that is not set. +set -u / set -o nounset +# exit immediately if a command fails +set -e + +cidir="${0%/*}" +cd ${cidir}/.. + +ci/editorconfig.sh +ci/remove_useless_declarations.sh + +citus_indent . --quiet