inherit language for the local inspection from the corresponding global one to prevent them running on unrelated files

This commit is contained in:
Alexey Kudravtsev
2017-02-27 15:16:53 +03:00
parent 7e434c6521
commit 9afdb0e181
@@ -91,6 +91,12 @@ public class GlobalInspectionToolWrapper extends InspectionToolWrapper<GlobalIns
return null;
}
//noinspection TestOnlyProblems
return new LocalInspectionToolWrapper(sharedTool);
return new LocalInspectionToolWrapper(sharedTool){
@Nullable
@Override
public String getLanguage() {
return GlobalInspectionToolWrapper.this.getLanguage(); // inherit "language=" xml tag from the global inspection EP
}
};
}
}