Replies: 1 comment
|
This makes sense to me. I wonder how much is a spec issue vs a tooling issue. I'd love to have conversations with tooling owners, but we should have a better handle on differences too. I have started conformance work to help me visualize - https://conformance.openlint.org/ |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I’ve looked into Vacuum a bit more and the main differences are caused by the fact that both Vacuum and Spectral’s rulesets are coupled to the programming language the software is written in. Spectral even more, as Vacuum uses a standard regex instead of a JS dialect. Another example is that Spectral rules support JSONPath+, which only exists as an extra JS library.
In order to support both tools and more formats in the future, we need to abstract these dependencies away in the next version of the spec. For example, switching JSONPath+ to JSONPath would make the spec more language-agnostic, but if we want to lint XML with OpenLint we probably want to use XPath instead.
As backwards compatibility is very important to us, we also need to think about specifying which version of the OpenLint spec we’re using. So I can imagine the next version of the spec starts with
openlint: 2.0.0(if we want to use semver, that’s another thing we’ll have to discuss ;-)); if this is absent, tools can consider it 1.0.0 (Spectral).My proposal would be to already start working on a next version of the spec, where we try to fix the differences between Vacuum and Spectral by making the spec independent from the implementing languages, while making new future formats possible as well. This would definitely be a draft document for probably quite a long time, but I think we don’t have to wait to start working on it in parallel.
The first steps would be to see if we can get both tools to run on a rewritten ruleset described by the new spec with minor code changes, with only the current features of both Vacuum and Spectral for now. If agreed, @joostfarla and I are willing to take the lead and/or make a start.
FYI: Vacuum is also used within the Dutch Government and getting these users on board would be a very nice thing for us; showing them we are already working on it would be a great help doing so.
All reactions