You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bn...@apache.org on 2024/02/09 20:37:10 UTC
(trafficserver) branch master updated: tools/clang-format.sh: don't run on lib (#11067)
This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e8dd4134b1 tools/clang-format.sh: don't run on lib (#11067)
e8dd4134b1 is described below
commit e8dd4134b1a6cd29b83ed540e018c8363c638f86
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Feb 9 14:37:04 2024 -0600
tools/clang-format.sh: don't run on lib (#11067)
The format target runs the clang-format.sh script on specific
directories, but the clang-format.sh, if run on its own, would also run
on lib. This fixes that so that the clang-format.sh script doesn't run
on the third-party lib directories.
---
tools/clang-format.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/clang-format.sh b/tools/clang-format.sh
index 866c1fde46..0697294ee4 100755
--- a/tools/clang-format.sh
+++ b/tools/clang-format.sh
@@ -38,7 +38,7 @@ function main() {
exit 2
fi
fi
- DIR=${@:-.}
+ DIR=${@:-$(dirname ${GIT_COMMON_DIR})}
PACKAGE="clang-format-${PKGDATE}.tar.bz2"
VERSION="clang-format version 17.0.1 (https://github.com/llvm/llvm-project.git e19b7dc36bc047b9eb72078d034596be766da350)"
@@ -100,7 +100,7 @@ EOF
start_time_file=$(mktemp -t clang-format-start-time.XXXXXXXXXX)
touch ${start_time_file}
- target_files=$(find $DIR -iname \*.[ch] -o -iname \*.cc -o -iname \*.h.in)
+ target_files=$(find $DIR -iname \*.[ch] -o -iname \*.cc -o -iname \*.h.in | grep -vE 'lib/(catch2|fastlz|swoc|yamlcpp)')
for file in ${target_files}; do
# The ink_autoconf.h and ink_autoconf.h.in files are generated files,
# so they do not need to be re-formatted by clang-format. Doing so