https://github.com/ci-space/protostyle
protostyle - protolint plugin for lint your team style
https://github.com/ci-space/protostyle
go grpc protobuf protolint
Last synced: 2 months ago
JSON representation
protostyle - protolint plugin for lint your team style
- Host: GitHub
- URL: https://github.com/ci-space/protostyle
- Owner: ci-space
- License: mit
- Created: 2025-01-10T18:50:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-15T21:38:03.000Z (over 1 year ago)
- Last Synced: 2025-10-15T00:16:24.801Z (9 months ago)
- Topics: go, grpc, protobuf, protolint
- Language: Go
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# protostyle
[](https://raw.githubusercontent.com/ci-space/protostyle/master/LICENSE)
**protostyle** - [protolint](https://github.com/yoheimuta/protolint) plugin for lint team style
## Usage
### GitHub Actions
Use [protolint-action](https://github.com/ci-space/protolint-action), contained protostyle
```yaml
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
```
### Locally
#### Download
##### 🐧 Linux AMD64
Download [archive](https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-amd64.zip) and extract **protostyle**
```shell
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-amd64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
```
##### 🐧 Linux ARM64
Download [archive](https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-arm64.zip) and extract **protostyle**
```shell
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-linux-arm64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
```
##### 🍏 Apple
Download [archive](https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-darwin-amd64.zip) and extract **protostyle**
```shell
curl -L https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-darwin-amd64.zip -o protostyle.zip && \
unzip protostyle.zip protostyle
```
##### 🍏 Apple M*
Download [archive](https://github.com/ci-space/protostyle/releases/download/v0.1.0/protostyle-darwin-arm64.zip) and extract **protostyle**
```shell
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
Run **protolint** with **protostyle**:
```shell
protolint lint -plugin ./protostyle .
```
## Rules
| 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 |