-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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/imports: use first quote when matching import path #365
Conversation
…as a double-quote
This PR (HEAD: 86d648d) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/386914 to see it. Tip: You can toggle comments from me using the |
Message from Gopher Robot: 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 Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Heschi Kreinick: Patch Set 1: Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 1: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 1: gopls-CI+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
This PR (HEAD: b934371) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/tools/+/386914 to see it. Tip: You can toggle comments from me using the |
Message from Josh Humphries: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Heschi Kreinick: Patch Set 2: Run-TryBot+1 Auto-Submit+1 Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 2: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 2: gopls-CI+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 2: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Josh Humphries: Patch Set 4: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Dmitri Shuralyov: Patch Set 4: Trust+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 5: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Dmitri Shuralyov: Patch Set 5: Trust+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Joshua Humphries: Patch Set 6: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 6: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 6: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 6: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 6: gopls-CI+1 Kokoro presubmit build finished with status: SUCCESS Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 6: TryBot-Result-1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 7: Patch Set 6 was rebased Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Ian Lance Taylor: Patch Set 7: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from Gopher Robot: Patch Set 7: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
Message from kokoro: Patch Set 7: Kokoro presubmit build starting for golang/tools/gopls-legacy/presubmit Please don’t reply on this GitHub thread. Visit golang.org/cl/386914. |
This fixes the regexp used to extract the import path from a line of code when inserting newlines to split a sequence of imports into groups. By using a non-greedy match, the regexp now functions correctly in the face of an extra quote after the import path (such as when there is a trailing comment that includes a quote). Fixes golang/go#51671 Change-Id: Id7fd0b1d794f989d8f3d47336c5b5454cddd6237 GitHub-Last-Rev: b934371 GitHub-Pull-Request: #365 Reviewed-on: https://go-review.googlesource.com/c/tools/+/386914 Reviewed-by: Heschi Kreinick <[email protected]> Trust: Dmitri Shuralyov <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
This PR is being closed because golang.org/cl/386914 has been merged. |
This fixes the regexp used to extract the import path from a line of code when inserting newlines to split a sequence of imports into groups. By using a non-greedy match, the regexp now functions correctly in the face of an extra quote after the import path (such as when there is a trailing comment that includes a quote). Fixes golang/go#51671 Change-Id: Id7fd0b1d794f989d8f3d47336c5b5454cddd6237 GitHub-Last-Rev: b934371fa6d9ded902deac2268658b4485d9ce70 GitHub-Pull-Request: golang/tools#365 Reviewed-on: https://go-review.googlesource.com/c/tools/+/386914 Reviewed-by: Heschi Kreinick <[email protected]> Trust: Dmitri Shuralyov <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
This fixes the regexp used to extract the import path from a line of code
when inserting newlines to split a sequence of imports into groups.
By using a non-greedy match, the regexp now functions correctly in the
face of an extra quote after the import path (such as when there is a
trailing comment that includes a quote).
Fixes golang/go#51671