Skip to content

Commit 8ddc062

Browse files
authored
ci: add proto lint test with clang-format (#3228)
Summary: We keep our protos formatted with `clang-format`, but hitherto have not enforced this, inviting regressions. This commit adds a CI lint check. Test Plan: Verified that this fails on CI before the `custom_scalars/layout.proto` fix, and passes afterward. wchargin-branch: ci-clang-format-proto
1 parent 49ec07b commit 8ddc062

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
BasedOnStyle: google

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,19 @@ jobs:
9191
run: |
9292
! git grep 'python_version = "PY2"' '*BUILD'
9393
94+
lint-proto:
95+
runs-on: ubuntu-16.04
96+
steps:
97+
- uses: actions/checkout@v1
98+
- name: clang-format lint
99+
uses: DoozyX/[email protected]
100+
with:
101+
source: ./tensorboard
102+
# Exclude tensorboard/compat because the source of truth is TensorFlow.
103+
exclude: ./tensorboard/compat/proto
104+
extensions: 'proto'
105+
clangFormatVersion: 9
106+
94107
check-misc:
95108
runs-on: ubuntu-16.04
96109
steps:

tensorboard/plugins/custom_scalar/layout.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ syntax = "proto3";
1717

1818
package tensorboard;
1919

20-
2120
/**
2221
* Encapsulates information on a single chart. Many charts appear in a category.
2322
*/

0 commit comments

Comments
 (0)