Skip to content

Commit 6efc102

Browse files
committed
Use clang-format 6.0 to check for code style (ariya#15403, ariya#15404)
This way, the CI can run on the faster and more common Ubuntu machine.
1 parent 9f64f22 commit 6efc102

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/codestyle.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ on: [push, pull_request]
55
jobs:
66

77
codestyle:
8-
runs-on: macos-latest
8+
runs-on: ubuntu-18.04
99
steps:
1010
- uses: actions/checkout@v2
11-
- run: brew install clang-format
11+
- run: sudo apt install -y clang-format-6.0
1212
name: Install clang-format
13-
- run: clang-format --version
13+
- run: clang-format-6.0 --version
1414
- run: bash ./tools/format-code.sh
1515
name: Run code formatter
16+
- run: git diff
1617
- run: git diff --quiet HEAD
1718
name: Check if the styling guide is followed

tools/format-code.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env bash
22

33
cwd=$(pwd)
4-
clang-format -i --style=WebKit $cwd/src/*.h $cwd/src/*.cpp
4+
clang-format-6.0 -i --style=WebKit $cwd/src/*.h $cwd/src/*.cpp

0 commit comments

Comments
 (0)