Skip to content

internal/lsp: added a fill struct code action #220

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

Closed
wants to merge 1 commit into from

Conversation

luciolas
Copy link
Contributor

@luciolas luciolas commented Apr 7, 2020

This code action generates key-value pairs of fields and default values between a struct's enclosing braces.

Fixes #37576

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from ab66547 to f84d949 Compare April 7, 2020 08:17
@gopherbot
Copy link
Contributor

This PR (HEAD: f84d949) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 1:

Congratulations on opening your first change. Thank you for your contribution!

Next steps:
Within the next week or so, a maintainer will review your change and provide
feedback. See https://golang.org/doc/contribute.html#review for more info and
tips to get your patch through code review.

Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.

During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11, it means that this CL will be reviewed as part of the next development
cycle. See https://golang.org/s/release for more details.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 1:

(4 comments)

Thanks for your contribution! See comments below.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from f84d949 to c6b1485 Compare April 9, 2020 05:45
@gopherbot
Copy link
Contributor

This PR (HEAD: c6b1485) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from c6b1485 to 7d5dac2 Compare April 9, 2020 06:12
@gopherbot
Copy link
Contributor

This PR (HEAD: 7d5dac2) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 3:

(4 comments)

Patch Set 1:

(4 comments)

Thanks for your contribution! See comments below.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Yasuhiro MATSUMOTO:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Yasuhiro MATSUMOTO:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 3:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 3:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from 7d5dac2 to b078437 Compare April 20, 2020 12:28
@gopherbot
Copy link
Contributor

This PR (HEAD: b078437) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 4:

(4 comments)

I will start adding feature tests.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas
Copy link
Contributor Author

Link issue: golang/go#37576

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 4:

(1 comment)

Thanks - this looks better! Some tests would be a good next step - they would probably fit into this code:

func (r *runner) SuggestedFix(t *testing.T, spn span.Span, actionKinds []string) {
.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 4:

(1 comment)

Patch Set 4:

(1 comment)

Thanks - this looks better! Some tests would be a good next step - they would probably fit into this code:

func (r *runner) SuggestedFix(t *testing.T, spn span.Span, actionKinds []string) {
.

Ok, I will add tests in there.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from b078437 to ee5afb8 Compare May 3, 2020 05:07
@gopherbot
Copy link
Contributor

This PR (HEAD: ee5afb8) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas
Copy link
Contributor Author

@stamblerre Just notifying you that I left a reply over at Gerrit. I just realized there was no email from GerritBot on my reply, so I thought of informing you over at Github.

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from ee5afb8 to 3fd37e5 Compare May 30, 2020 01:16
@gopherbot
Copy link
Contributor

This PR (HEAD: 3fd37e5) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from 3fd37e5 to a041375 Compare May 30, 2020 01:34
@gopherbot
Copy link
Contributor

This PR (HEAD: a041375) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Alisson Bruno:

Patch Set 7: Code-Review+1

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 7:

(3 comments)

Thank you for the changes! I just have a few small comments and then we can get this merged :)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from a041375 to 3f420fa Compare June 3, 2020 18:37
@gopherbot
Copy link
Contributor

This PR (HEAD: 3f420fa) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

…individual

fields and default values between a struct's enclosing braces

Fixes #37576
@luciolas luciolas force-pushed the golang/x/tools/fill-struct branch from 3f420fa to 0e4db3e Compare June 3, 2020 18:55
@gopherbot
Copy link
Contributor

This PR (HEAD: 0e4db3e) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/tools/+/227437 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Pei-Xian Chee:

Patch Set 9:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Rebecca Stambler:

Patch Set 9: Run-TryBot+1 Code-Review+2

Awesome, thank you!


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 9:

TryBots beginning. Status page: https://farmer.golang.org/try?commit=e6584fed


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gobot Gobot:

Patch Set 9: TryBot-Result+1

TryBots are happy.


Please don’t reply on this GitHub thread. Visit golang.org/cl/227437.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Jun 4, 2020
This code action generates key-value pairs of fields and default values between a struct's enclosing braces.

Fixes #37576

Change-Id: Ia0555164d2164c2bc90bb9ecabbb55042cdd3846
GitHub-Last-Rev: 0e4db3e
GitHub-Pull-Request: #220
Reviewed-on: https://go-review.googlesource.com/c/tools/+/227437
Reviewed-by: Rebecca Stambler <[email protected]>
Run-TryBot: Rebecca Stambler <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/227437 has been merged.

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

Successfully merging this pull request may close these issues.

3 participants