Files
teleport/buf-legacy.yaml
T
Luke Okraszewski 8a57596668 Add custom buf lint plugin for paginated APIs (#57433) (#57694)
rfd/0153-resource-guidelines.md has introduced standards
for RPCs that should make use of pagination. Unfortunately
prior to this commit there has been no automated tooling for
catching deviations from that specification. This commit adds
a custom local `buf` plugin which can catch and notifiy missing
pagination fields.
2025-08-08 12:30:32 +00:00

48 lines
1.2 KiB
YAML

# buf-legacy.yaml is used so we can apply tighter settings to legacy protos.
# This should be used exclusively to lint legacy protos, all other actions
# should use the default buf.yaml file.
version: v2
modules:
- path: api/proto
deps:
# gogo/protobuf v1.3.2, keep in sync with build.assets/versions.mk.
- buf.build/gogo/protobuf:b03c65ea87cdc3521ede29f62fe3ce239267c1bc
- buf.build/googleapis/googleapis:beb34b4050abfcfff72ff5cc6a28f0afa4043ce0
lint:
use:
- STANDARD
- PACKAGE_NO_IMPORT_CYCLE
# Top-level types require comments.
# TODO(codingllama): Fix messages and enable linters below.
# - COMMENT_ENUM
# - COMMENT_MESSAGE
- COMMENT_RPC
- COMMENT_SERVICE
- PAGINATION_REQUIRED
except:
# MINIMAL
- PACKAGE_DIRECTORY_MATCH
# BASIC
- ENUM_VALUE_UPPER_SNAKE_CASE
- FIELD_LOWER_SNAKE_CASE
- ONEOF_LOWER_SNAKE_CASE
# STANDARD
- ENUM_VALUE_PREFIX
- ENUM_ZERO_VALUE_SUFFIX
- PACKAGE_VERSION_SUFFIX
- RPC_REQUEST_RESPONSE_UNIQUE
- RPC_REQUEST_STANDARD_NAME
- RPC_RESPONSE_STANDARD_NAME
plugins:
- plugin:
- env
- GOWORK=off
- go
- -C
- ./build.assets/tooling
- run
- ./cmd/buf-plugin-linters