Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions bazel/envoy_mobile_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ def swift_repos():
url = "https://github.com/bazelbuild/rules_swift/releases/download/0.27.0/rules_swift.0.27.0.tar.gz",
)

http_archive(
name = "SwiftLint",
build_file_content = """exports_files(["swiftlint"])""",
sha256 = "61d335766a39ba8fa499017a560950bd9fa0b0e5bc318559a9c1c7f4da679256",
url = "https://github.com/realm/SwiftLint/releases/download/0.47.1/portable_swiftlint.zip",
)

def kotlin_repos():
http_archive(
name = "rules_jvm_external",
Expand Down
8 changes: 8 additions & 0 deletions tools/check_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ if [ -z "$ENVOY_FORMAT_ACTION" ]; then
ENVOY_FORMAT_ACTION="check"
fi

if [[ $(uname) == "Darwin" ]]; then
if [[ "${ENVOY_FORMAT_ACTION}" == "fix" ]]; then
./bazelw run --run_under="cd $PWD && " @SwiftLint//:swiftlint -- --fix --quiet 2>/dev/null
else
./bazelw run --run_under="cd $PWD && " @SwiftLint//:swiftlint -- --strict --quiet 2>/dev/null
fi
fi

TARGET_PATH="$2"

# TODO(mattklein123): WORKSPACE is excluded due to warning about @bazel_tools reference. Fix here
Expand Down