New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revive: unidiomatic `// revive:` syntax #1

Closed
sbinet opened this Issue May 30, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@sbinet

sbinet commented May 30, 2018

Just a quick drive-by comment after having glanced at:
https://blog.mgechev.com/2018/05/28/revive-golang-golint-linter/

you're using // revive:xxx to feed intructions to revive:

// revive:disable
type Expression struct {
    Value      string
    IsStar     bool
    IsVariadic bool
    IsWriter   bool
    Underlying string
}
// revive:enable

usually, in the Go ecosystem, comments that are meant for programs or machines do not have a leading space:

//+build ignore

package foo

import "C"

//go:noinline
func Foo() {}

//export MyLib
func MyLib(v *C.char) C.int { ... }

now, the consensus is to use //go:xyz as a directive for programs.

Just my 2-cents.

@mgechev

This comment has been minimized.

Owner

mgechev commented May 30, 2018

@sbinet thanks for the suggestion! I'll update the codebase, docs, & articles in the next day or two.

@mgechev mgechev closed this in a4da536 Jun 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment