Skip to content

Commit 155dc6e

Browse files
adonovangopherbot
authored andcommitted
gopls/internal/settings: document why unusedvariable is off
Updates golang/go#48975 Updates golang/go#54373 Change-Id: I6537ee08ae87e75ce47fdac63f6286048ec666e9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/640040 Reviewed-by: Robert Findley <[email protected]> Auto-Submit: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent ac8980c commit 155dc6e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

gopls/internal/settings/analysis.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,7 @@ func init() {
197197
{analyzer: fillreturns.Analyzer},
198198
{analyzer: nonewvars.Analyzer},
199199
{analyzer: noresultvalues.Analyzer},
200-
// TODO(rfindley): why isn't the 'unusedvariable' analyzer enabled, if it
201-
// is only enhancing type errors with suggested fixes?
202-
//
203-
// In particular, enabling this analyzer could cause unused variables to be
204-
// greyed out, (due to the 'deletions only' fix). That seems like a nice UI
205-
// feature.
206-
{analyzer: unusedvariable.Analyzer, nonDefault: true},
200+
{analyzer: unusedvariable.Analyzer, nonDefault: true}, // not fully baked; see #54373
207201
}
208202
for _, analyzer := range analyzers {
209203
DefaultAnalyzers[analyzer.analyzer.Name] = analyzer

0 commit comments

Comments
 (0)