Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Use clang-format 6.0 to check for code style (#15403, #15404)
Browse files Browse the repository at this point in the history
This way, the CI can run on the faster and more common Ubuntu machine.
  • Loading branch information
ariya committed Jun 2, 2020
1 parent 9f64f22 commit 6efc102
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on: [push, pull_request]
jobs:

codestyle:
runs-on: macos-latest
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- run: brew install clang-format
- run: sudo apt install -y clang-format-6.0
name: Install clang-format
- run: clang-format --version
- run: clang-format-6.0 --version
- run: bash ./tools/format-code.sh
name: Run code formatter
- run: git diff
- run: git diff --quiet HEAD
name: Check if the styling guide is followed
2 changes: 1 addition & 1 deletion tools/format-code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

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

0 comments on commit 6efc102

Please sign in to comment.