From 296a89ce6364fd97099d694dddcbb30e8b0925c0 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Thu, 10 Sep 2020 15:02:37 -0400 Subject: [PATCH] feat(ci): Run clang-format to check files. --- .clang-format | 4 ++++ .github/workflows/clang-format-lint.yml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 .clang-format create mode 100644 .github/workflows/clang-format-lint.yml diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..3c29522a --- /dev/null +++ b/.clang-format @@ -0,0 +1,4 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +ColumnLimit: 100 +SortIncludes: false diff --git a/.github/workflows/clang-format-lint.yml b/.github/workflows/clang-format-lint.yml new file mode 100644 index 00000000..061bc3da --- /dev/null +++ b/.github/workflows/clang-format-lint.yml @@ -0,0 +1,25 @@ +name: clang-format-lint + +on: + push: + paths: + - "app/boards/**/*.c" + - "app/include/**/*.h" + - "app/src/**" + pull_request: + paths: + - "app/boards/**/*.c" + - "app/include/**/*.h" + - "app/src/**" + +jobs: + build: + runs-on: ubuntu-latest + name: clang-format lint + + steps: + - uses: actions/checkout@v2 + - uses: DoozyX/clang-format-lint-action@v0.9 + with: + source: "./app" + extensions: "h,c"