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

internal: run goimports on generated snippets #4037

Closed
codyoss opened this issue May 3, 2021 · 2 comments
Closed

internal: run goimports on generated snippets #4037

codyoss opened this issue May 3, 2021 · 2 comments

Comments

@codyoss
Copy link
Member

@codyoss codyoss commented May 3, 2021

I believe we should be able to run imports.Process. Currently unformatted imports fail CI on regen. Manually patched in #4025

@codyoss
Copy link
Member Author

@codyoss codyoss commented May 3, 2021

cc @tbpg

Loading

@tbpg
Copy link
Collaborator

@tbpg tbpg commented May 3, 2021

goimports is run on generated snippets here:

if len(dirs) > 0 {
cmd := execabs.Command("goimports", "-w", ".")
cmd.Dir = outDir
if err := cmd.Run(); err != nil {
return fmt.Errorf("failed to run goimports: %v", err)
}
}

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants