Skip to main content
Glama

protolint-mcp

by yoheimuta
hasExtendedVisitor.go1.4 kB
package visitor import ( "github.com/yoheimuta/go-protoparser/v4/parser" "github.com/yoheimuta/protolint/linter/autodisable" "github.com/yoheimuta/protolint/linter/report" ) // HasExtendedVisitor is a required interface given to RunVisitor. type HasExtendedVisitor interface { parser.Visitor // Finally is called when visiting is done. Finally(*parser.Proto) error // Failures returns the accumulated failures. Failures() []report.Failure } // RunVisitor dispatches the call to the visitor. func RunVisitor( visitor HasExtendedVisitor, proto *parser.Proto, ruleID string, ) ([]report.Failure, error) { return RunVisitorAutoDisable(visitor, proto, ruleID, autodisable.Noop) } // RunVisitorAutoDisable dispatches the call to the visitor. func RunVisitorAutoDisable( visitor HasExtendedVisitor, proto *parser.Proto, ruleID string, autodisableType autodisable.PlacementType, ) ([]report.Failure, error) { // This check is just for existing test cases. protoFilename := "" if proto.Meta != nil { protoFilename = proto.Meta.Filename } autoDisabled, err := newExtendedAutoDisableVisitor(visitor, ruleID, protoFilename, autodisableType) if err != nil { return nil, err } disabled := newExtendedDisableRuleVisitor( autoDisabled, ruleID, ) proto.Accept(disabled) if err := disabled.Finally(proto); err != nil { return nil, err } return disabled.Failures(), nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yoheimuta/protolint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server