Use YAML in plugin
I'm trying to make an inspection that works on YAML files, but I don't really get how to do this. I read the IntelliJ Plugin Extension page, but I can't seem to get it to work. This is what I've currently got:
<extensions defaultExtensionNs="org.jetbrains.plugins.yaml">
</extensions>
Now I'm supposed to add a reference to an extension point in here, but I can't seem to find one. I looked over at the GitHub page, but the plugin.xml file seems to have no extension points declared. So, is it even possible to make use of the YAML plugin? Or am I doing it completely wrong?
请先登录再写评论。
Hi Stefvanschiedev,
You don't need to look for particular YAML plugin extension points. The easiest way to implement and add an inspection is to refer to the
extensionPoint. The implementation class should extend `com.intellij.codeInspection.LocalInspectionTool`, it has some javadoc. To register you extension, you'll also need to define attributes like
Please tell me if you have any further questions.
Regards,
Valentin.
Thank you Valentin Fondaratov, that solved my issue.