1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-16 14:27:01 +00:00

Auto-format protobuf files

This patch runs clang-format on the protobuf files, and also adds a
Makefile target for auto-formatting code (Go and protobuf) for
convenience.
This commit is contained in:
Alberto Bertogli
2023-10-03 23:29:21 +01:00
parent d57037273c
commit 8ded1f6f5e
5 changed files with 20 additions and 10 deletions

4
.clang-format Normal file
View File

@@ -0,0 +1,4 @@
Language: Proto
BasedOnStyle: Google
IndentWidth: 8
UseTab: AlignWithSpaces

1
.gitignore vendored
View File

@@ -6,6 +6,7 @@
# Exceptions to the rules above: files we care about that would otherwise be
# excluded.
!.gitignore
!.clang-format
!.github/
# The binaries.

View File

@@ -55,6 +55,11 @@ install-config-skeleton:
chown -v mail:mail /var/lib/chasquid ; \
fi
fmt:
go vet ./...
gofmt -s -w .
clang-format -i $(shell find . -iname '*.proto')
.PHONY: chasquid test \
chasquid-util smtp-check mda-lmtp dovecot-auth-cli
chasquid-util smtp-check mda-lmtp dovecot-auth-cli \
fmt

View File

@@ -28,7 +28,8 @@ message Config {
// Addresses to listen on for submission-over-TLS (usually port 465).
// Default: "systemd", which means systemd passes sockets to us.
// systemd sockets must be named with "FileDescriptorName=submission_tls".
// systemd sockets must be named with
// "FileDescriptorName=submission_tls".
repeated string submission_over_tls_address = 5;
// Address for the monitoring http server.
@@ -37,9 +38,9 @@ message Config {
string monitoring_address = 6;
// Mail delivery agent (MDA, also known as LDA) to use.
// This should point to the binary to use to deliver email to local users.
// The content of the email will be passed via stdin.
// If it exits unsuccessfully, we assume the mail was not delivered.
// This should point to the binary to use to deliver email to local
// users. The content of the email will be passed via stdin. If it exits
// unsuccessfully, we assume the mail was not delivered.
// Default: "maildrop".
string mail_delivery_agent_bin = 7;

View File

@@ -55,4 +55,3 @@ message Timestamp {
// Non-negative fractions of a second at nanosecond resolution.
int32 nanos = 2;
}