Skip to content

Commit

Permalink
Merge pull request #28 from yoheimuta/fix-extend/27
Browse files Browse the repository at this point in the history
chore: Bump go-protoparser and fix trivial incompat issues
  • Loading branch information
yoheimuta authored Jun 12, 2019
2 parents 3a5223c + 27194aa commit 07eae4d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/yoheimuta/protolint
require (
github.com/kr/pretty v0.1.0 // indirect
github.com/kr/pty v1.1.5 // indirect
github.com/yoheimuta/go-protoparser v1.3.0
github.com/yoheimuta/go-protoparser v2.0.0+incompatible
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/yaml.v2 v2.2.2
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/yoheimuta/go-protoparser v1.2.0 h1:QUc8Y0L6ucTqw5Cm1EH4GFbXqcM6MutSr1
github.com/yoheimuta/go-protoparser v1.2.0/go.mod h1:NMMDARGayMyLM9oD1JUgKyF1Tv7aj9S+KcTG4lqvemo=
github.com/yoheimuta/go-protoparser v1.3.0 h1:rHDOtpGuaFUFmT1qIlg/RrUjBB8GabEGA97siSEAD7E=
github.com/yoheimuta/go-protoparser v1.3.0/go.mod h1:NMMDARGayMyLM9oD1JUgKyF1Tv7aj9S+KcTG4lqvemo=
github.com/yoheimuta/go-protoparser v2.0.0+incompatible h1:HVstTyDcki8G0F7CMm7ktPP22v7Y/WyLG4VV+fuxCJE=
github.com/yoheimuta/go-protoparser v2.0.0+incompatible/go.mod h1:NMMDARGayMyLM9oD1JUgKyF1Tv7aj9S+KcTG4lqvemo=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
3 changes: 3 additions & 0 deletions internal/addon/rules/internal/visitor/baseVisitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func (BaseVisitor) VisitEnum(*parser.Enum) (next bool) { return true }
// VisitEnumField works noop.
func (BaseVisitor) VisitEnumField(*parser.EnumField) (next bool) { return true }

// VisitExtend works noop.
func (BaseVisitor) VisitExtend(*parser.Extend) (next bool) { return true }

// VisitField works noop.
func (BaseVisitor) VisitField(*parser.Field) (next bool) { return true }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ func (v extendedDisableRuleVisitor) VisitEnumField(e *parser.EnumField) (next bo
}
return v.inner.VisitEnumField(e)
}
func (v extendedDisableRuleVisitor) VisitExtend(m *parser.Extend) (next bool) {
if v.interpreter.Interpret(m.Comments, m.InlineComment, m.InlineCommentBehindLeftCurly) {
return true
}
return v.inner.VisitExtend(m)
}
func (v extendedDisableRuleVisitor) VisitField(f *parser.Field) (next bool) {
if v.interpreter.Interpret(f.Comments, f.InlineComment) {
return true
Expand Down

0 comments on commit 07eae4d

Please sign in to comment.