Skip to content

Commit

Permalink
Add lint rule for clang-format on protobufs.
Browse files Browse the repository at this point in the history
Summary:
Adds a lint rule that runs clang-format on all protobuf files.
Also updates all protobuf files to be compliant with said rule.

Test Plan: Style changes only, no functional changes.

Reviewers: zasgar, vihang

Reviewed By: vihang

Signed-off-by: James Bartlett <[email protected]>

Differential Revision: https://phab.corp.pixielabs.ai/D12231

GitOrigin-RevId: acc4b07e791c861f9f2d8dc53cdb2b845ec74f69
  • Loading branch information
JamesMBartlett authored and copybaranaut committed Sep 21, 2022
1 parent 260ebb8 commit 5cd440a
Show file tree
Hide file tree
Showing 42 changed files with 896 additions and 809 deletions.
6 changes: 4 additions & 2 deletions .arclint
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"(c_cpp_properties.json$)",
"(go\\.mod$)",
"(go\\.sum$)",
"(^third_party/cpplint/cpplint.py$)"
"(^third_party/cpplint/cpplint.py$)",
"(^third_party/github.com/gogo/protobuf/gogoproto/gogo.proto$)"
],
"linters": {
"bpf-naming": {
Expand Down Expand Up @@ -62,7 +63,8 @@
"clang-format": {
"type": "clang-format",
"include": [
"(\\.(m|h|mm|c|cc)$)"
"(\\.(m|h|mm|c|cc)$)",
"(\\.proto$)"
]
},
"cpplint": {
Expand Down
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 2
UseTab: Never
---
Language: Proto
AllowShortFunctionsOnASingleLine: Empty
AllowShortEnumsOnASingleLine: false
...
Loading

0 comments on commit 5cd440a

Please sign in to comment.