Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim committed Dec 4, 2024
1 parent e2bd96d commit b8b94b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#include <pthread.h>

// Initiate an upload in a separate thread, otherwise we won't be mid-upload during fork
void* upload_in_thread(void*) {
void*
upload_in_thread(void*)
{
ddup_upload();

return nullptr;
Expand Down
7 changes: 6 additions & 1 deletion scripts/cformat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ then
| grep -v '_taint_tracking/_vendor/' \
| grep -v 'ddtrace/appsec/_iast/_taint_tracking/cmake-build-debug/' \
| grep -v '^ddtrace/appsec/_iast/_taint_tracking/_vendor/' \
| grep -v '^ddtrace/internal/datadog/profiling/dd_wrapper/include/vendored/' \
| while IFS= read -r file; do
clang-format -i $file
echo "Formatting $file"
done
else
git ls-files '*.c' '*.h' '*.cpp' '*.hpp' | grep -v '^ddtrace/vendor/' | grep -v '^ddtrace/appsec/_iast/_taint_tracking/_vendor/' | while read filename
git ls-files '*.c' '*.h' '*.cpp' '*.hpp' \
| grep -v '^ddtrace/vendor/' \
| grep -v '^ddtrace/appsec/_iast/_taint_tracking/_vendor/' \
| grep -v '^ddtrace/internal/datadog/profiling/dd_wrapper/include/vendored/' \
| while read filename
do
CFORMAT_TMP=`mktemp`
clang-format "$filename" > "$CFORMAT_TMP"
Expand Down

0 comments on commit b8b94b9

Please sign in to comment.