Commit 3487f940 authored by David Frank's avatar David Frank
Browse files

Add -i flag to clang-format error message

In case of an error, print a version of the clang-format command
that will actually fix the error and not only print to standard out
parent ec8261b8
Pipeline #744298 passed with stages
in 10 minutes and 41 seconds
......@@ -48,7 +48,7 @@ if (( ${#files[@]} )); then
if ! "$clang_format_tool" --dry-run -Werror -style=file "${files[@]}"; then
echo -e "[${RED}FAIL${NC}]: Oops, something isn't correct with the formatting, please check the errors above"
echo -e "[${BLUE}INFO${NC}]: From the root directory you can also run:"
echo "find elsa/ benchmarks/ examples/ | egrep \".+\.(h|hpp|cpp|cu|cuh)$\" | xargs $clang_format_tool -style=file"
echo "find elsa/ benchmarks/ examples/ | egrep \".+\.(h|hpp|cpp|cu|cuh)$\" | xargs $clang_format_tool -i -style=file"
if [[ "$master_ahead" -gt "0" ]]; then
echo -e "[${BLUE}INFO${NC}]: Files considered:"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment