Skip to content
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

x/tools/cmd/goimports: add configuration mechanism for ignore list #16386

Closed
bradfitz opened this issue Jul 15, 2016 · 6 comments
Closed

x/tools/cmd/goimports: add configuration mechanism for ignore list #16386

bradfitz opened this issue Jul 15, 2016 · 6 comments

Comments

@bradfitz
Copy link
Contributor

Per the golang-nuts thread (https://groups.google.com/forum/#!msg/golang-nuts/in9IVmPc_fQ/BO4wzOylCAAJ), goimports should have a configuration mechanism to permit designated ignored directories.

@bradfitz bradfitz added this to the Unreleased milestone Jul 15, 2016
@bradfitz bradfitz self-assigned this Jul 15, 2016
@ghost
Copy link

ghost commented Jul 15, 2016

Please make an unified mechanism. Then other src-scanning tools could also use it.

@bradfitz
Copy link
Contributor Author

@pi, which other ones? Who should I talk to? Does one already exist?

@ghost
Copy link

ghost commented Jul 15, 2016

godoc for example;
in analysys/analysys.go:

    // Enumerate packages in $GOPATH.
    for i, dir := range filepath.SplitList(build.Default.GOPATH) {
        root := filepath.Join(dir, "src") + string(os.PathSeparator)
....

And I doubt you should talk to anyone. You boss ;)

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/24971 mentions this issue.

@thomasf
Copy link

thomasf commented Jul 19, 2016

@bradfitz the other src tool that I use quite a bit is gorename.. It maybe takes about a minute to run it and it spews out errors about C code which isn't used by any Go code at all.. I'll guess that the answer of which source tool needs speed improvements differ depending on who uses what often.

Btw, It's probably better to have separate ignore files per tool for flexibility, one can always use symlinks to use a single file if the format is the same.

(and... thanks for the very much speedier goimports)

@bradfitz
Copy link
Contributor Author

@thomasf, I filed #16427 to track that. Let's move any discussion there.

@golang golang locked and limited conversation to collaborators Jul 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants