I'd like to have a typing-time error whenever I do...
# intellij-plugins
e
I'd like to have a typing-time error whenever I don't specify DSL parameters marked as mandatory (via an annotation), like this one (unfortunately Android-only). I tried with a static analyzer (detekt) but it looks this comes into play only when you manually compile the code. Someone mentioned also Arrow-meta (but I didn't get a clear answer on that). So my next though was an Idea Plugin. On the docs page, though, it's suggested that an Idea plugin may be overkill and to look at the alternative approaches, which are: • Structural Search and Replace Inspections • IDE Scripting Console • Flora Plugin • Live Plugin • PhpStorm Advanced Metadata Now, I don't know any of these, so I'd like to ask to anyone experienced in these fields which approach would be the right one for my case without being overkill
d
Depends on what you mean by “typing-time error” 🙂 If something like an IDE inspection will do, then you can try extending this example https://github.com/dkandalov/live-plugin/blob/master/plugin-examples/kotlin/kotlin-inspection/plugin.kts Btw, the same code should also work with scripting console or flora plugin, but you won’t have registerInspection() function and will have to register/unregister inspection yourself.
e
I guess so, I mean something like this

https://miro.medium.com/max/1400/1*lzanVUqZD7kfnX3cuiBNOQ.png

d
It does look like an inspection to me.