public class ErlangUnusedTypeInspection extends ErlangInspectionBase {
@Override
protected void checkFile(@NotNull ErlangFile file, @NotNull final ProblemsHolder problemsHolder) {
for (ErlangTypeDefinition o : file.getTypes()) {
Query<PsiReference> search = ReferencesSearch.search(o, new LocalSearchScope(o.getContainingFile()));
if (search.findFirst() == null) {
problemsHolder.registerProblem(o.getNameIdentifier(),
"Unused function " + "'" + o.getName() + "'",
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
new ErlangRemoveTypeFix(),