-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
languages: add HashiCorp Sentinel #2282
Conversation
This adds HashiCorp's Sentinel policy-as-code language as a supported language. https://docs.hashicorp.com/sentinel
Currently the core library is closed to new language submissions as there are not really even enough core maintainers to maintain our existing languages (much less add and support new ones). Context: #2149 We'd be happy to create a repository for you in the I'd like to make it much easier for people to build custom bundles (including 3rd party grammars), that is something I'll be looking into after we switch to a simpler build system for the core library. That said it's currently terribly easy to "add" a new language just be including an extra JS file in the browser... so if vlang.io wants to support this they only need to include the vlang.js file AFTER they load the main library, or build a custom build. |
Thanks @yyyc514. We are using highlight.js in Sentinel's new website for syntax highlighting. Currently the site hosts a local copy like you mentioned, but upstreaming was the logical step to assist with maintenance, especially if anyone else noticed issues. I'd be open to a repo that I/we at HC maintained for sure. Is there an existing framework yet for packaging, testing, and distribution? I guess as this gets solidified (it seems that #2149 is still in discussion), there will be more info. Let me know! |
NO, but there are samples inside the HLJS organization such as: You'd just package it as an npm package. No great testing story yet. |
Hi @vancluever, |
@egor-rogov @yyyc514 thanks for that! I've populated the repository with the content from this PR. Assuming that's all that's necessary for now this can be closed I guess? Regarding builds - will you all be building/pushing the packages or is that left to the maintainers? I notice there isn't one for robots.txt yet. |
I think that'd be up to maintainers. And I don't think having a NPM is an absolutely necessity, but it makes things easier for people wanting to use it via NPM. |
Alright, I'm going to close this off now, since the repo is populated. We'll figure out a strategy for maintaining this on NPM if we need to, otherwise it's just available by source. Thanks again you two! |
That's just a matter of packaging and publishing. |
This adds HashiCorp's Sentinel policy-as-code language as a supported
language.
https://docs.hashicorp.com/sentinel