From 3309d61a76db43ea65128e369e5cfed2fb39768f Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 8 Aug 2024 20:47:11 +0200 Subject: [PATCH 1/3] Do not format *.patch --- cpp_format_tools/format.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp_format_tools/format.sh b/cpp_format_tools/format.sh index 5432a17..f37596f 100755 --- a/cpp_format_tools/format.sh +++ b/cpp_format_tools/format.sh @@ -18,8 +18,8 @@ fi # No CRLF line endings, except Windows files. "${SED[@]}" 's/\r$//' $($FIND -name '*.ps1' -prune -o \ -name '*.cmd' -prune -o -type f -print) -# No trailing spaces. -"${SED[@]}" 's/ \+$//' $($FIND -type f -print) +# No trailing spaces, except in patch. +"${SED[@]}" 's/ \+$//' $($FIND -name "*.patch" -prune -o -type f -print) # If not overridden, try to use clang-format-18 or clang-format. if [[ -z "$CLANG_FORMAT" ]]; then @@ -56,4 +56,4 @@ else echo "Can't find buildifier. It can be installed with:" echo " go get github.com/bazelbuild/buildtools/buildifier" exit 1 -fi \ No newline at end of file +fi From 2cc3896577c9c386bdf94d86d39f2c8de9bd07c1 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 8 Aug 2024 21:01:51 +0200 Subject: [PATCH 2/3] No format of *.diff as well --- cpp_format_tools/format.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp_format_tools/format.sh b/cpp_format_tools/format.sh index f37596f..b8be96f 100755 --- a/cpp_format_tools/format.sh +++ b/cpp_format_tools/format.sh @@ -18,8 +18,8 @@ fi # No CRLF line endings, except Windows files. "${SED[@]}" 's/\r$//' $($FIND -name '*.ps1' -prune -o \ -name '*.cmd' -prune -o -type f -print) -# No trailing spaces, except in patch. -"${SED[@]}" 's/ \+$//' $($FIND -name "*.patch" -prune -o -type f -print) +# No trailing spaces, except in diff or patch. +"${SED[@]}" 's/ \+$//' $($FIND -name "*.diff" -prune -o -name "*.patch" -prune -o -type f -print) # If not overridden, try to use clang-format-18 or clang-format. if [[ -z "$CLANG_FORMAT" ]]; then From b4734476c1848e5742045ff287601e7316c06dd6 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Thu, 8 Aug 2024 21:07:08 +0200 Subject: [PATCH 3/3] Changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf3e68c..43aea3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,8 @@ Increment the: ## [Unreleased] -* TITLE +* [FORMAT] Do not format .diff and .patch + [#10](https://github.com/open-telemetry/cpp-build-tools/pull/10) ## [0.0] 2024-02-16