-
Notifications
You must be signed in to change notification settings - Fork 2.3k
tools/gopls: add command line support for suggestedfix #174
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
Conversation
This commit adds support for calling suggestedfix from the gopls command line, e.g. $ gopls suggestedfix ~/tmp/foo/main.go Optional arguments are: - -w, which writes the changes back to the original file; and - -d, which prints a unified diff to stdout With no arguments, the changed files are printed to stdout.
This PR (HEAD: a0a0341) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/202480 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Please stop sending me emails
…On Mon, Oct 21, 2019, 3:01 PM GopherBot ***@***.***> wrote:
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/202480
<https://go-review.googlesource.com/c/tools/+/202480#message-fd2bcc0ec520a7fb71d5cc817f5addf0e2c7f85a>
.
After addressing review feedback, remember to publish your drafts
<https://github.com/golang/go/wiki/GerritBot#i-left-a-reply-to-a-comment-in-gerrit-but-no-one-but-me-can-see-it>
!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#174?email_source=notifications&email_token=ANLNR2KZ7RN6IYAHIRI6GVDQPX36XA5CNFSM4JDDK7LKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB3NKUQ#issuecomment-544658770>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANLNR2PE4NH63THFSHSAYW3QPX36XANCNFSM4JDDK7LA>
.
|
Message from Ian Cottrell: Patch Set 1: Nice! Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Add a flag for all fixes
This PR (HEAD: d344403) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/202480 to see it. Tip: You can toggle comments from me using the |
Message from Kalman Bekesi: Patch Set 2:
Yeah, good idea. I've made the updates, although it does feel light on tests. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Kalman Bekesi: Patch Set 3: Commit message was updated. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Rebecca Stambler: Patch Set 4: Run-TryBot+1 Code-Review+2 Thanks - this looks great! Agreed that we need some more tests, but unfortunately we don't have many suggested fixes (except for those in the opt-in tool staticcheck). You could enable staticcheck by adding Thank you for your contributions! Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 4: TryBots beginning. Status page: https://farmer.golang.org/try?commit=d0db29b5 Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 4: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Rebecca Stambler: Patch Set 5: Patch Set 4 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Rebecca Stambler: Patch Set 5: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 5: TryBots beginning. Status page: https://farmer.golang.org/try?commit=2f84b39f Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 5: Build is still in progress... Other builds still in progress; subsequent failure notices suppressed until final report. Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test exactly your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Rebecca Stambler: Patch Set 5: -Run-TryBot TryBot failures are unrelated - caused by golang/go#35226. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
This PR (HEAD: 070fcda) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/202480 to see it. Tip: You can toggle comments from me using the |
Message from Rebecca Stambler: Patch Set 7: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 7: TryBots beginning. Status page: https://farmer.golang.org/try?commit=84f7b430 Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
Message from Gobot Gobot: Patch Set 7: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/202480. |
This adds support for calling suggestedfix from the gopls command line, e.g. $ gopls suggestedfix ~/tmp/foo/main.go Optional arguments are: -w, which writes the changes back to the original file; and -d, which prints a unified diff to stdout With no arguments, the changed files are printed to stdout. Wasn't sure if the command should be `suggestedfix` or just `fix` or `quickfix`? Also this applies all changes to a file, does not allow for selective fixes. Updates golang/go#32875 Change-Id: I8b75f9824be82974f6edb7c03383b4d56116943c GitHub-Last-Rev: 070fcda GitHub-Pull-Request: #174 Reviewed-on: https://go-review.googlesource.com/c/tools/+/202480 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This PR is being closed because golang.org/cl/202480 has been merged. |
This adds support for calling suggestedfix from the gopls command line, e.g.
$ gopls suggestedfix ~/tmp/foo/main.go
Optional arguments are:
-w, which writes the changes back to the original file; and
-d, which prints a unified diff to stdout
With no arguments, the changed files are printed to stdout.
Wasn't sure if the command should be
suggestedfix
or justfix
orquickfix
?Also this applies all changes to a file, does not allow for selective fixes.
Updates golang/go#32875