mirror of
https://github.com/golang/go
synced 2024-11-18 08:34:44 -07:00
cmd/gorename: move gorename TODOs to a comment in the code
This CL moves gorename TODOs from -help output to a comment in the code. Fixes golang/go#25824 Change-Id: I60e843804ebf1e374882ea3424e4ab749d038c1f Reviewed-on: https://go-review.googlesource.com/c/150937 Run-TryBot: Yury Smolsky <yury@smolsky.by> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
91f80e683c
commit
04b5d21e00
@ -107,34 +107,34 @@ $ gorename -offset file.go:#123 -to foo
|
||||
$ gorename -from '"bytes".Buffer.Len' -to Size
|
||||
|
||||
Rename the "Len" method of the *bytes.Buffer type to "Size".
|
||||
|
||||
---- TODO ----
|
||||
|
||||
Correctness:
|
||||
- handle dot imports correctly
|
||||
- document limitations (reflection, 'implements' algorithm).
|
||||
- sketch a proof of exhaustiveness.
|
||||
|
||||
Features:
|
||||
- support running on packages specified as *.go files on the command line
|
||||
- support running on programs containing errors (loader.Config.AllowErrors)
|
||||
- allow users to specify a scope other than "global" (to avoid being
|
||||
stuck by neglected packages in $GOPATH that don't build).
|
||||
- support renaming the package clause (no object)
|
||||
- support renaming an import path (no ident or object)
|
||||
(requires filesystem + SCM updates).
|
||||
- detect and reject edits to autogenerated files (cgo, protobufs)
|
||||
and optionally $GOROOT packages.
|
||||
- report all conflicts, or at least all qualitatively distinct ones.
|
||||
Sometimes we stop to avoid redundancy, but
|
||||
it may give a disproportionate sense of safety in -force mode.
|
||||
- support renaming all instances of a pattern, e.g.
|
||||
all receiver vars of a given type,
|
||||
all local variables of a given type,
|
||||
all PkgNames for a given package.
|
||||
- emit JSON output for other editors and tools.
|
||||
`
|
||||
|
||||
// ---- TODO ----
|
||||
|
||||
// Correctness:
|
||||
// - handle dot imports correctly
|
||||
// - document limitations (reflection, 'implements' algorithm).
|
||||
// - sketch a proof of exhaustiveness.
|
||||
|
||||
// Features:
|
||||
// - support running on packages specified as *.go files on the command line
|
||||
// - support running on programs containing errors (loader.Config.AllowErrors)
|
||||
// - allow users to specify a scope other than "global" (to avoid being
|
||||
// stuck by neglected packages in $GOPATH that don't build).
|
||||
// - support renaming the package clause (no object)
|
||||
// - support renaming an import path (no ident or object)
|
||||
// (requires filesystem + SCM updates).
|
||||
// - detect and reject edits to autogenerated files (cgo, protobufs)
|
||||
// and optionally $GOROOT packages.
|
||||
// - report all conflicts, or at least all qualitatively distinct ones.
|
||||
// Sometimes we stop to avoid redundancy, but
|
||||
// it may give a disproportionate sense of safety in -force mode.
|
||||
// - support renaming all instances of a pattern, e.g.
|
||||
// all receiver vars of a given type,
|
||||
// all local variables of a given type,
|
||||
// all PkgNames for a given package.
|
||||
// - emit JSON output for other editors and tools.
|
||||
|
||||
var (
|
||||
// Force enables patching of the source files even if conflicts were reported.
|
||||
// The resulting program may be ill-formed.
|
||||
|
Loading…
Reference in New Issue
Block a user