pointlander/peg

Cleanup generated code for golint?

fd0 opened this issue · 1 comments

fd0 commented

Thanks for writing peg! I noticed that the generated code produces some warnings for golint:

$ ./golint ./...
configfile.peg.go:10:7: don't use underscores in Go names; const end_symbol should be endSymbol
configfile.peg.go:29:2: don't use underscores in Go names; const rule_ should be rule
configfile.peg.go:38:2: don't use underscores in Go names; const rulePre_ should be rulePre
configfile.peg.go:39:2: don't use underscores in Go names; const rule_In_ should be ruleIn
configfile.peg.go:40:2: don't use underscores in Go names; const rule_Suf should be ruleSuf
configfile.peg.go:101:1: receiver name ast should be consistent with previous receiver name node for node32
configfile.peg.go:210:10: should omit 2nd value from range; this loop is equivalent to `for i := range ...`
configfile.peg.go:349:9: should omit 2nd value from range; this loop is equivalent to `for i := range ...`

Are you interested in a PR which fixes these (stylistic) issues?

sure, sounds good

On Mon, Jun 6, 2016 at 11:52 PM, Alexander Neumann <notifications@github.com

wrote:

Thanks for writing peg! I noticed that the generated code produces some
warnings for golint:

$ ./golint ./...
configfile.peg.go:10:7: don't use underscores in Go names; const end_symbol should be endSymbolconfigfile.peg.go:29:2: don't use underscores in Go names; const rule_ should be rule
configfile.peg.go:38:2: don't use underscores in Go names; const rulePre_ should be rulePreconfigfile.peg.go:39:2: don't use underscores in Go names; const rule_In_ should be ruleIn
configfile.peg.go:40:2: don't use underscores in Go names; const rule_Suf should be ruleSufconfigfile.peg.go:101:1: receiver name ast should be consistent with previous receiver name node for node32configfile.peg.go:210:10: should omit 2nd value from range; this loop is equivalent to for i := range ...configfile.peg.go:349:9: should omit 2nd value from range; this loop is equivalent to for i := range ...

Are you interested in a PR which fixes these (stylistic) issues?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#48, or mute the thread
https://github.com/notifications/unsubscribe/AAPZFFhC-K5G-ROEXDwoLbFFl0g3XvBBks5qJQc5gaJpZM4IvlRD
.