Versions in this module Expand all Collapse all v0 v0.0.1 Jan 14, 2026 Changes in this version + func GetAllMessages(f protoreflect.FileDescriptor) (messages []protoreflect.MessageDescriptor) + type Config struct + DisabledRules []string + EnabledRules []string + ExcludedPaths []string + IncludedPaths []string + type Configs []Config + func ReadConfigsFromFile(path string) (Configs, error) + func ReadConfigsJSON(f io.Reader) (Configs, error) + func ReadConfigsYAML(f io.Reader) (Configs, error) + func (configs Configs) IsRuleEnabled(rule string, path string) bool + type DescriptorRule struct + LintDescriptor func(protoreflect.Descriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.Descriptor) bool + func (r *DescriptorRule) GetName() RuleName + func (r *DescriptorRule) Lint(fd protoreflect.FileDescriptor) []Problem + type EnumRule struct + LintEnum func(protoreflect.EnumDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.EnumDescriptor) bool + func (r *EnumRule) GetName() RuleName + func (r *EnumRule) Lint(fd protoreflect.FileDescriptor) []Problem + type EnumValueRule struct + LintEnumValue func(protoreflect.EnumValueDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.EnumValueDescriptor) bool + func (r *EnumValueRule) GetName() RuleName + func (r *EnumValueRule) Lint(fd protoreflect.FileDescriptor) []Problem + type FieldRule struct + LintField func(protoreflect.FieldDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.FieldDescriptor) bool + func (r *FieldRule) GetName() RuleName + func (r *FieldRule) Lint(fd protoreflect.FileDescriptor) []Problem + type FileRule struct + LintFile func(protoreflect.FileDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.FileDescriptor) bool + func (r *FileRule) GetName() RuleName + func (r *FileRule) Lint(fd protoreflect.FileDescriptor) []Problem + type Linter struct + func New(rules RuleRegistry, configs Configs, opts ...LinterOption) *Linter + func (l *Linter) LintProtos(files ...protoreflect.FileDescriptor) ([]Response, error) + type LinterOption func(l *Linter) + func Debug(debug bool) LinterOption + func IgnoreCommentDisables(ignoreCommentDisables bool) LinterOption + type MessageRule struct + LintMessage func(protoreflect.MessageDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.MessageDescriptor) bool + func (r *MessageRule) GetName() RuleName + func (r *MessageRule) Lint(fd protoreflect.FileDescriptor) []Problem + type MethodRule struct + LintMethod func(protoreflect.MethodDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.MethodDescriptor) bool + func (r *MethodRule) GetName() RuleName + func (r *MethodRule) Lint(fd protoreflect.FileDescriptor) []Problem + type Problem struct + Descriptor protoreflect.Descriptor + Location *dpb.SourceCodeInfo_Location + Message string + RuleID RuleName + Suggestion string + func (p Problem) GetRuleURI() string + func (p Problem) MarshalJSON() ([]byte, error) + func (p Problem) MarshalYAML() (interface{}, error) + type ProtoRule interface + GetName func() RuleName + Lint func(protoreflect.FileDescriptor) []Problem + type Response struct + FilePath string + Problems []Problem + type RuleName string + func NewRuleName(aip int, name string) RuleName + func (r RuleName) HasPrefix(prefix ...string) bool + func (r RuleName) IsValid() bool + type RuleRegistry map[RuleName]ProtoRule + func NewRuleRegistry() RuleRegistry + func (r RuleRegistry) Register(aip int, rules ...ProtoRule) error + type ServiceRule struct + LintService func(protoreflect.ServiceDescriptor) []Problem + Name RuleName + OnlyIf func(protoreflect.ServiceDescriptor) bool + func (r *ServiceRule) GetName() RuleName + func (r *ServiceRule) Lint(fd protoreflect.FileDescriptor) []Problem