@@ -22,9 +22,29 @@ TARGET_PATH="$2"
2222
2323# TODO(mattklein123): WORKSPACE is excluded due to warning about @bazel_tools reference. Fix here
2424# or in the upstream checker.
25- ENVOY_BAZEL_PREFIX=@envoy envoy/tools/code_format/check_format.py \
26- --config_path envoy/tools/code_format/config.yaml \
27- --add-excluded-prefixes ./envoy/ ./envoy_build_config/extensions_build_config.bzl ./WORKSPACE ./Envoy.xcodeproj/ ./dist/ ./library/common/config_template.cc ./bazel/envoy_mobile_swift_bazel_support.bzl ./bazel/envoy_mobile_repositories.bzl ./examples/swift/swiftpm/Packages/Envoy.xcframework \
28- --skip_envoy_build_rule_check " $ENVOY_FORMAT_ACTION " " $TARGET_PATH " \
29- --namespace_check_excluded_paths ./envoy ./examples/ ./library/java/ ./library/kotlin ./library/objective-c ./test/java ./test/java ./test/objective-c ./test/swift ./experimental/swift \
30- --build_fixer_check_excluded_paths ./envoy ./BUILD ./dist ./examples ./library/java ./library/kotlin ./library/objective-c ./library/swift ./library/common/extensions ./test/java ./test/kotlin ./test/objective-c ./test/swift ./experimental/swift
25+
26+ FORMAT_ARGS=(
27+ --config_path envoy/tools/code_format/config.yaml
28+ --add-excluded-prefixes
29+ ./envoy/ ./envoy_build_config/extensions_build_config.bzl ./WORKSPACE
30+ ./Envoy.xcodeproj/ ./dist/ ./library/common/config_template.cc
31+ ./bazel/envoy_mobile_swift_bazel_support.bzl
32+ ./bazel/envoy_mobile_repositories.bzl
33+ ./examples/swift/swiftpm/Packages/Envoy.xcframework
34+ --skip_envoy_build_rule_check
35+ " $ENVOY_FORMAT_ACTION " )
36+ if [[ -n " $TARGET_PATH " ]]; then
37+ FORMAT_ARGS+=(" $TARGET_PATH " )
38+ fi
39+ FORMAT_ARGS+=(
40+ --namespace_check_excluded_paths
41+ ./envoy ./examples/ ./library/java/ ./library/kotlin
42+ ./library/objective-c ./test/java ./test/java
43+ ./test/objective-c ./test/swift ./experimental/swift
44+ --build_fixer_check_excluded_paths
45+ ./envoy ./BUILD ./dist ./examples ./library/java
46+ ./library/kotlin ./library/objective-c ./library/swift
47+ ./library/common/extensions ./test/java ./test/kotlin ./test/objective-c
48+ ./test/swift ./experimental/swift)
49+
50+ ENVOY_BAZEL_PREFIX=@envoy envoy/tools/code_format/check_format.py " ${FORMAT_ARGS[@]} "
0 commit comments