open-policy-agent / opa

Open Policy Agent (OPA) is an open source, general-purpose policy engine.

Home Page:https://www.openpolicyagent.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build IDE integration for IntelliJ

tsandall opened this issue · comments

It would be nice to have an IntelliJ plugin that adds OPA syntax highlighting, syntax checking, testing, tracing, and evaluation features like we have for VS Code.

I haven't looked into the development effort required for creating IntelliJ plugins. Over time it would be great to have feature parity with the VS Code plugin.

This feature has been proposed as part of GSoC 2019. https://github.com/cncf/soc#open-policy-agent-opa

@vgramer is looking into this.

@vgramer do you have any updates on this? We're going to submit it to GSOC 2020 but if you have made a bunch of progress we can always pull it.

Hi nothing really tangible. Unfortunately I didn’t have time to work on it during holiday and I have a bit forgotten what I have done :s

Anyway so far, I have implemented a subset of the rego grammar (a subset was easier to debug) and some functionally like highlighting or commenting . But i am still struggling with intelliJ api to know how to execute an action (opa fmt, opa eval ... ) and renderer the result.

I hope to have more time in the next week to work on it . However i think it's a good idea to submit to GSOC 2020, there are a lots of work to do ;)

Hey, If nobody has been working on this, can this be proposed for CommunityBridge?
I would be happy to work on this

@twisted-sres Yeah sure.
Please ping me on opa slack so we can start taking about that.

Slack id vgramer

@vgramer if you would like to propose the project for CommunityBridge, you would need to add it here with a description similar to this.

The deadline is May 1st 2020.

Hi, any update? This is a nice idea

Hi @UkonnRa
A first version of the plugin is available here: https://github.com/vgramer/opa-idea-plugin. The installation of the plugin requires some manual configuration for the moment (add a custom repository). It should be available in the stable repository (no manual configuration) by the next week.

I'm going to close this issue now since the plugin exists over at https://github.com/vgramer/opa-idea-plugin. We can file bug/enhancement issues in that repo going forward.