A linter that enforces Buf-specific Go style.
go install buf.build/go/bufstyle
bufstyle ./...
To automatically fix issues that bufstyle
knows how to fix:
bufstyle -fix ./...
A .bufstyle.yaml
file can be added in the working directory to disable and ignore analyzers:
version: v1
disable:
- BEHAVIOUR
ignore:
PACKAGE_FILENAME:
- internal/foo/foo.go
- internal/pkg
This will never be generally available and is not stable. By design, you should not use this unless you are developing libraries within github.com/bufbuild
or buf.build/go
.
Offered under the Apache 2 license.