Linting for OCIF #63
Replies: 2 comments 2 replies
-
|
This is a cool idea. We had thought about a validator, which would also list errors. A particular case we did think about is a "generic merge". Use case: App A exports OCIF. App B reads it, discards all elements it does not know (it should not do this, but some apps will do this. Or another external converter converts OCIF to app-B-format, which has no extension semantics.). So then app B loads the data, user edits it, and stores back as app-b-native format. Then either an external converter or a plugin within app-B brings it back into OCIF shape. So in short, yes, such a linter is an excellent, missing piece :-) |
Beta Was this translation helpful? Give feedback.
-
|
Just as an FYI, I spent some AI tokens building a POC here: https://github.com/abstractalgo/graflint It takes I will keep iterating there over time and, at some point, probably give a summary of the things I've learned. Anyhow, for now, I just wanted to bring attention to it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Similar to how regular code linters traverse AST, output diagnostics and even do automatic changes to fix it, I see the potential for "linters for OCIF", and they could then be used to offer various "functionality" - guides for alignment of the nodes, parent-child relations, loop detections and highlighting,...
While the structure of such behavior can be modeled as a pure function (
output_canvas = lint(input_canvas)), I like to think about it from the POV of linters as it may potentially overlay its "diagnostics" on top of the existing canvas etc, and not just necessarily merge it with the input canvas content; or even have several different "diagnostics layers" that can be stacked on top of each other.Another advantage of the canvas format being very rich and extensible is that the output of linters for it can similarly be very rich (in contrast to code lint diagnostics mostly being about just a start and end position in the text (or AST node) and a diagnostics message), a linter for OCIF could output all kinds of useful visual guides/lines, messages and elements.
Beta Was this translation helpful? Give feedback.
All reactions