https://github.com/iwittkau/proto-golint
Linter for correct usage of protobuf generated messages
https://github.com/iwittkau/proto-golint
go golang golangci-lint grpc grpc-go linter protobuf
Last synced: 2 months ago
JSON representation
Linter for correct usage of protobuf generated messages
- Host: GitHub
- URL: https://github.com/iwittkau/proto-golint
- Owner: iwittkau
- License: mit
- Created: 2021-02-08T06:48:07.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-06T12:15:42.000Z (almost 2 years ago)
- Last Synced: 2025-03-26T22:19:56.178Z (3 months ago)
- Topics: go, golang, golangci-lint, grpc, grpc-go, linter, protobuf
- Language: Go
- Homepage:
- Size: 79.1 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
proto-golint
===> Linter for Go code that uses [protobuf messages](https://developers.google.com/protocol-buffers/).
# Getters
Reports reading fields of proto message structs without the getter:
```
internal/test/proto.go:33:3: getters: proto message field read without getter: t.Embedded (proto-golint)
t.Embedded,
```Supports `--fix` flag to apply the suggested fix directly.
# Why?
This is mostly a fun project to learn how to write a linter for Go. **[Fatih Arslan's][fatih] blog was a [tremendous][analysis] [help][fix] in doing that!**
[fatih]: https://arslan.io/
[analysis]: https://arslan.io/2019/06/13/using-go-analysis-to-write-a-custom-linter/
[fix]: https://arslan.io/2020/07/07/using-go-analysis-to-fix-your-source-code/