result.addProblem(declaration,
GoBundle.message(
"error.constant.not.used",
declaration.getText()),
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
new RemoveVariableFix());
} else {
result.addProblem(declaration,
GoBundle.message(
"error.variable.not.used",
declaration.getText()),
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
new RemoveVariableFix());
}
continue;
}
}
if (declaration.getParent().getParent().getParent() instanceof GoPsiTypeFunctionImpl) {
continue;
}
if (PARAMETER_DECLARATION.accepts(declaration)) {
result.addProblem(declaration,
GoBundle.message("error.parameter.not.used",
declaration.getText()),
ProblemHighlightType.WEAK_WARNING);
} else if (CONST_DECLARATION.accepts(declaration)) {
result.addProblem(declaration,
GoBundle.message("error.constant.not.used",
declaration.getText()),
ProblemHighlightType.ERROR,
new RemoveVariableFix());
} else {
result.addProblem(declaration,
GoBundle.message("error.variable.not.used",
declaration.getText()),
ProblemHighlightType.ERROR,
new RemoveVariableFix());
}
}
}