Skip to content

[pull] master from golang:master#496

Merged
pull[bot] merged 2 commits intodareagle:masterfrom
golang:master
Oct 28, 2019
Merged

[pull] master from golang:master#496
pull[bot] merged 2 commits intodareagle:masterfrom
golang:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Oct 28, 2019

See Commits and Changes for more details.


Created by pull[bot]. Want to support this open source service? Please star it : )

agnivade and others added 2 commits October 28, 2019 23:33
This is a 2nd attempt at fixing CL 162337 which had an off-by-one error.
We were unconditionally getting the position of the start of the next line
from the last import without checking whether it is the end of the file or not.

Fix the code to check for that and move the testcase added in CL 190523
to the end of the file for it to trigger the issue properly.

Fixes #18929

Change-Id: I59e77256e256570b160fea6a17bce9ef49e810df
Reviewed-on: https://go-review.googlesource.com/c/go/+/190480
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
"declared and not used" is technically correct, but might confuse
the user. Switching "and" to "but" will hopefully create the
contrast for the users: they did one thing (declaration), but
not the other --- actually using the variable.

This new message is still not ideal (specifically, declared is not
entirely precise here), but at least it matches the other parsers
and is one step in the right direction.

Change-Id: I725c7c663535f9ab9725c4b0bf35b4fa74b0eb20
Reviewed-on: https://go-review.googlesource.com/c/go/+/203282
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
@pull pull bot added the ⤵️ pull label Oct 28, 2019
@pull pull bot merged commit 449b6ab into dareagle:master Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants