Skip to content

Commit 143c090

Browse files
authored
use clang-format included from wasi-sdk (#871)
1 parent dd91fa5 commit 143c090

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,16 @@ jobs:
314314
runs-on: ubuntu-latest
315315
steps:
316316
- uses: actions/checkout@v3
317+
- name: "Install wasi-sdk-20 (linux)"
318+
run: |
319+
set -x
320+
curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz
321+
tar xf wasi-sdk-20.0-linux.tar.gz
322+
sudo mkdir -p /opt/wasi-sdk
323+
sudo mv wasi-sdk-20.0/* /opt/wasi-sdk/
324+
ls /opt/wasi-sdk/
317325
- run: |
318-
clang-format --version
326+
/opt/wasi-sdk/bin/clang-format --version
319327
ci/clang-format.sh
320328
- run: |
321329
ci/rustfmt.sh

ci/clang-format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ for file in $(git ls-files | grep '\.\(cpp\|h\)$'); do
4848
fi
4949

5050
formatted="${file}.formatted"
51-
clang-format "$file" > "$formatted"
51+
/opt/wasi-sdk/bin/clang-format "$file" > "$formatted"
5252
if ! cmp -s "$file" "$formatted"; then
5353
if [ -z "$fix" ]; then
5454
rm "$formatted"

runtime/js-compute-runtime/builtins/transform-stream-default-controller.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class TransformStreamDefaultController
1919
TransformInput, // JS::Value to be used by TransformAlgorithm, e.g. a
2020
// JSFunction to call.
2121
FlushAlgorithm,
22-
FlushInput, // JS::Value to be used by FlushAlgorithm, e.g. a JSFunction to
23-
// call.
22+
FlushInput, // JS::Value to be used by FlushAlgorithm, e.g. a JSFunction to
23+
// call.
2424
Count
2525
};
2626

0 commit comments

Comments
 (0)