Skip to content

Commit

Permalink
[FORMAT] Do not format .diff and .patch (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored Aug 8, 2024
1 parent c053750 commit f02fd54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions cpp_format_tools/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 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
Expand Down Expand Up @@ -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
fi

0 comments on commit f02fd54

Please sign in to comment.