You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gorename tool does not update the comment associated to the renamed symbol. As comment are used for documentation and are validated by go linter, refactoring the code with gorename often let the code in something that compile but that dose not follow the rules for comments.
quentinmit
changed the title
gorename not updating comments associated to renamed symbol.
x/tools/cmd/gorename: update comments associated with renamed symbol
Nov 22, 2016
@quentinmit thanks for your code. I did not know about the "PathEnclosingInterval(pos, pos)" function, it clearly makes a better code that what I initially proposed.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.7 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
What did you do?
gorename tool does not update the comment associated to the renamed symbol. As comment are used for documentation and are validated by go linter, refactoring the code with gorename often let the code in something that compile but that dose not follow the rules for comments.
let's consider the following program:
If we rename 'MyFunc' the associated comment will not be update:
What did you expect to see? What I would like to see?
Would be good if gorename can also take care of updating the comments:
The text was updated successfully, but these errors were encountered: