From 04b5d21e00f1f47bd824a6ade581e7189bacde87 Mon Sep 17 00:00:00 2001 From: Yury Smolsky Date: Thu, 22 Nov 2018 00:04:10 +0200 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Alan Donovan --- refactor/rename/rename.go | 52 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/refactor/rename/rename.go b/refactor/rename/rename.go index e952b98417..19b749e608 100644 --- a/refactor/rename/rename.go +++ b/refactor/rename/rename.go @@ -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.