Skip to content

Instantly share code, notes, and snippets.

@dctucker
Created June 15, 2023 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dctucker/4b992824fe8bc43f18e16d7381d68e1f to your computer and use it in GitHub Desktop.
Save dctucker/4b992824fe8bc43f18e16d7381d68e1f to your computer and use it in GitHub Desktop.
run clang-format in Docker for DelugeFirmware
#!/bin/bash
cd "$(dirname "$0")"
run_args=(
-it
-v $(pwd):/tree
--rm
--workdir /tree
)
lint_args=(
--recursive
--clang-format-executable /clang-format/clang-format14
--style file
--inplace true
--extensions c,cpp,h,hpp
--exclude none
./src
)
docker run "${run_args[@]}" clang-format-lint "${lint_args[@]}" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment