From 309133d5b6f94125837df8cb3ceb93abcb9c3962 Mon Sep 17 00:00:00 2001 From: Javier Alvarez Date: Mon, 8 Mar 2021 00:45:47 +0100 Subject: [PATCH] CI for clang format Change-Id: I0e122cfc6873de830b35bcd482b4029fddbc2e04 --- .github/workflows/main.yml | 16 ++++++++++++++++ docs/CONTRIBUTING.md | 1 + libpostform/inc/postform/shared_types.hpp | 1 - 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc22b87..3a0d7ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -109,6 +109,22 @@ jobs: name: manifest path: manifest.xml + clang_format: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: Javier-varez/google-repo-action@v0.3 + with: + manifest-url: 'Javier-varez/manifest' + manifest-group: 'postform' + checkout-deps: true + - name: clang-format lint + uses: DoozyX/clang-format-lint-action@v0.11 + with: + source: 'postform' + clangFormatVersion: 10 + system_test: runs-on: ubuntu-latest needs: [ cargo_build, libpostform_build ] diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index aaf9994..c6c10e2 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -19,4 +19,5 @@ You don't necessarily have to contribute just with pull requests. Any other kind * Global variables that are not marked as static shall have a `g_` prefix. * Static global variables use `s_` as a prefix. * Use `camelCase` instead of `PascalCase` for methods. + * C++ code should be formatted with clang-format version 10. diff --git a/libpostform/inc/postform/shared_types.hpp b/libpostform/inc/postform/shared_types.hpp index a2b217d..a76b36e 100644 --- a/libpostform/inc/postform/shared_types.hpp +++ b/libpostform/inc/postform/shared_types.hpp @@ -18,4 +18,3 @@ struct Config { } // namespace Postform #endif // POSTFORM_SHARED_TYPES_H_ -