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
Assignees
Milestone

Comments

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Jul 15, 2016

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 ghost commented Jul 15, 2016

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

@bradfitz
Copy link
Contributor Author

@bradfitz bradfitz commented Jul 15, 2016

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

@ghost
Copy link

@ghost 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

@gopherbot gopherbot commented Jul 15, 2016

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

@thomasf
Copy link

@thomasf 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

@bradfitz bradfitz commented Jul 19, 2016

@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.