protostyle - protolint plugin for lint team style
Use protolint-action, contained protostyle
jobs:
protolint:
name: protolint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Run linter
uses: ci-space/protolint-action@master
Download archive and extract protostyle
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-amd64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
Download archive and extract protostyle
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-arm64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
Download archive and extract protostyle
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-darwin-amd64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
Download archive and extract protostyle
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-darwin-arm64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
Run protolint with protostyle:
protolint lint -plugin ./protostyle .
Rule | Fixable | Description |
---|---|---|
PROTOSTYLE_LIST_MESSAGES_RESOURCE_NAME_PLURALIZED | ✅ | List request/response must have pluralized resource name |
PROTOSTYLE_RPC_WITH_HTTP | - | Method must have http option |
PROTOSTYLE_RPC_WITHOUT_RESOURCE_NAME | ✅ | Method must not contain resource name |
PROTOSTYLE_FIELD_WITH_BEHAVIOR | - | Field must have behavior option (google.api.field_behavior) |
PROTOSTYLE_ENUM_IN_FILE_END | - | Enum must be in file end |
PROTOSTYLE_COMMENT_ENDS_DOT | ✅ | The comment must end with a dot |