Skip to content

Commit 66f075b

Browse files
committed
Inline
1 parent 8fbc85f commit 66f075b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/com/goide/inspections/unresolved/GoUnusedGlobalVariableInspection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
public class GoUnusedGlobalVariableInspection extends GoUnusedVariableInspection {
2828
@Override
2929
protected void reportError(@NotNull GoVarDefinition varDefinition, @NotNull ProblemsHolder holder) {
30-
String name = varDefinition.getName();
3130
holder.registerProblem(varDefinition, "Unused variable <code>#ref</code> #loc", ProblemHighlightType.LIKE_UNUSED_SYMBOL,
32-
new GoDeleteVarDefinitionQuickFix(name));
31+
new GoDeleteVarDefinitionQuickFix(varDefinition.getName()));
3332
}
3433

3534
@Override

src/com/goide/inspections/unresolved/GoUnusedVariableInspection.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ public void visitVarDefinition(@NotNull GoVarDefinition o) {
7979
}
8080

8181
protected void reportError(@NotNull GoVarDefinition varDefinition, @NotNull ProblemsHolder holder) {
82-
String name = varDefinition.getName();
8382
holder.registerProblem(varDefinition, "Unused variable <code>#ref</code> #loc", ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
84-
new GoRenameToBlankQuickFix(varDefinition), new GoDeleteVarDefinitionQuickFix(name));
83+
new GoRenameToBlankQuickFix(varDefinition), new GoDeleteVarDefinitionQuickFix(varDefinition.getName()));
8584
}
8685

8786
protected boolean shouldValidate(@Nullable GoVarDeclaration varDeclaration) {

0 commit comments

Comments
 (0)