// Run lints the protocol buffer.
Run lints the protocol buffer.
// Run lints the protocol buffer .
func (l *Linter) Run(
	genProto func(*parser.Proto) (*parser.Proto, error),
	hasApplies []rule.HasApply,
) ([]report.Failure, error) {
	var fs []report.Failure
	var p *parser.Proto
	var err error
	for _, hasApply := range hasApplies {
		p, err = genProto(p)
		if err != nil {
			return nil, err
		}
		f, err := hasApply.Apply(p)
		if err != nil {
			return nil, err
		}
		fs = append(fs, f...)
	}
	return fs, nil
}
func ( l * Linter ) Run ( genProto func ( * parser . Proto ) ( * parser . Proto , error ) , hasApplies [ ] rule . HasApply , ) ( [ ] report . Failure , error ) { var fs [ ] report . Failure var p * parser . Proto var err error for _ , hasApply := range hasApplies { p , err = genProto ( p ) if err != nil { return nil , err } f , err := hasApply . Apply ( p ) if err != nil { return nil , err } fs = append ( fs , f ... ) } return fs , nil }
Run lints the protocol buffer.
Run lints the protocol buffer .