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

x/tools/refactor/rename: could update godoc as well #13000

Closed
tessr opened this issue Oct 20, 2015 · 2 comments
Closed

x/tools/refactor/rename: could update godoc as well #13000

tessr opened this issue Oct 20, 2015 · 2 comments
Milestone

Comments

@tessr
Copy link

@tessr tessr commented Oct 20, 2015

When I run gorename -from '"package".Foo' -to 'Bar' on the following:

// Foo does some things.
func Foo() {}

gorename currently leaves the comment untouched, but it would be nice if the comment updated as well, to:

// Bar does some things.
func Bar() {}
@rakyll
Copy link
Contributor

@rakyll rakyll commented Oct 20, 2015

@rakyll rakyll added this to the Unreleased milestone Oct 20, 2015
@alandonovan
Copy link
Contributor

@alandonovan alandonovan commented Oct 21, 2015

It would be nice, but algorithmic approaches can do a partial job at best. Heuristics might be able to identify the subject of the first sentence of the doc comment, but the name might appear many times within the doc comment (and other comments), capitalized or not, and it's impossible to distinguish identifiers from technical terms in comments.

For these reasons, I'd rather not touch it.

@golang golang locked and limited conversation to collaborators Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.