mirror of
https://github.com/golang/go
synced 2024-11-06 02:16:10 -07:00
e31b568ad1
Now that fillstruct is an analyzer, we can simplify the code that calls it in code_action.go. We introduce a new class of analyzer -- convenience analyzers, which are closer to commands. These represent suggestions that won't necessarily improve the quality or correctness of your code, but they offer small helper functions for the user. This CL also combines the refactor rewrite tests with the suggested fix tests, since they are effectively the same. For now, we only support convenience analyzers when a code action was requested on the same line as the fix. I'm not sure how to otherwise handle this without bothering the user with unnecessary diagnostics. Change-Id: I7f0aa198b5ee9964a907d709bae6380093d4ef21 Reviewed-on: https://go-review.googlesource.com/c/tools/+/237687 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
.. | ||
fillreturns | ||
fillstruct | ||
nonewvars | ||
noresultvalues | ||
simplifycompositelit | ||
simplifyrange | ||
simplifyslice | ||
undeclaredname | ||
unusedparams |