ci: Add Clang Format Github Action
Reference: https://github.com/RafikFarhad/clang-format-github-action https://stackoverflow.com/questions/33258159/how-to-make-clang-format-skip-sections-of-c-code
This commit is contained in:
parent
0a171c7b43
commit
9b99437103
|
@ -0,0 +1,16 @@
|
|||
name: Clang Format
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
clang-format-checking:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: RafikFarhad/clang-format-github-action@v1.0.1
|
||||
with:
|
||||
sources: "src/**/*.h,src/**/*.cpp"
|
||||
style: file
|
|
@ -9,6 +9,7 @@
|
|||
#include "perfectAI.h"
|
||||
#include <cassert>
|
||||
|
||||
// clang-format off
|
||||
unsigned int soTableTurnLeft[] = {
|
||||
2, 14, 23,
|
||||
5, 13, 20,
|
||||
|
@ -168,6 +169,7 @@ unsigned int soTableMirrorDiag2[] = {
|
|||
18, 10, 3,
|
||||
21, 9, 0
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
// define the four groups
|
||||
unsigned int squareIndexGroupA[] = { 3, 5, 20, 18 };
|
||||
|
|
Loading…
Reference in New Issue