diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml new file mode 100644 index 00000000..1b8202b2 --- /dev/null +++ b/.github/workflows/clang-format.yml @@ -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 diff --git a/src/perfect/perfectAI.cpp b/src/perfect/perfectAI.cpp index d83ddf75..707907ad 100644 --- a/src/perfect/perfectAI.cpp +++ b/src/perfect/perfectAI.cpp @@ -9,6 +9,7 @@ #include "perfectAI.h" #include +// 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 };