summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-03-27 13:50:14 +0200
committerDavid Lönnhager <david.l@mullvad.net>2023-03-27 16:47:52 +0200
commitfb45f4bfca38b5448bce787445750b0540067c6f (patch)
tree1a8bff22f6f76f0f3b95937bd2129efddeb136c6
parentb2f85417ec78b687c1b4698c8633ad96f16dc898 (diff)
downloadmullvadvpn-fb45f4bfca38b5448bce787445750b0540067c6f.tar.xz
mullvadvpn-fb45f4bfca38b5448bce787445750b0540067c6f.zip
Add workflow for checking proto file formatting
-rw-r--r--.clang-format4
-rw-r--r--.github/workflows/proto-format-check.yml17
2 files changed, 21 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000..747194fa1a
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,4 @@
+---
+Language: Proto
+ColumnLimit: 100
+...
diff --git a/.github/workflows/proto-format-check.yml b/.github/workflows/proto-format-check.yml
new file mode 100644
index 0000000000..e88cb3b03d
--- /dev/null
+++ b/.github/workflows/proto-format-check.yml
@@ -0,0 +1,17 @@
+---
+name: Check formatting of proto files
+on:
+ pull_request:
+ paths:
+ - '**/*.proto'
+ workflow_dispatch:
+jobs:
+ check-formatting:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Run clang-format for proto files
+ uses: jidicula/clang-format-action@v4.11.0
+ with:
+ clang-format-version: 15
+ include-regex: ^.*\.proto$