Skip to content

Commit 2ab7a16

Browse files
committed
[FIX] correct language detection in inspection
1 parent 17da1bc commit 2ab7a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/seesharpsoft/intellij/plugins/csv/intention/CsvValidationInspection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public PsiElementVisitor buildVisitor(@NotNull final ProblemsHolder holder, bool
7171
return new PsiElementVisitor() {
7272
@Override
7373
public void visitElement(PsiElement element) {
74-
if (element == null || element.getLanguage() != CsvLanguage.INSTANCE) {
74+
if (element == null || !holder.getFile().getLanguage().isKindOf(CsvLanguage.INSTANCE)) {
7575
return;
7676
}
7777

0 commit comments

Comments
 (0)