Skip to content

CLI support #47

@garfieldnate

Description

@garfieldnate

To make the power of V-S accessible in contexts where users cannot or do not want to open the actual editor, CLI support for the various project actions would be very useful. I'm thinking of CI, in particular, where we could run datamap validation on every commit, but it would also become accessible for plugins in other editors. You could think of this is a baby version of the LSP idea that already provides a lot of value.

  • CLI entry point with help output
  • Check that project file(s) are well-formed
  • Check all productions against datamap
  • Check all productions for syntax errors
  • Verify subtree (for specific DM node or for all foreign DM nodes)
  • Re-import subtree (for specific DM node or for all foreign DM nodes)
  • Search DM for WMEs that are never tested
  • Search DM for WMEs that are never created
  • Search DM for WMEs that are tested but never created
  • Search DM for WMEs that are created but never tested
  • Search DM for WMEs that are never created or tested
  • Generate datamap from current operator hierarchy
  • Auto-complete at a position in a production
  • Add (non-)validated support to DM (V-S supports this in response to a validation error)

For my current purposes I really only care about the top few on the list, but I've listed what I think are all of the potentially useful commands.

I would set the return code to 0 for no issues found, 1 for some found, -1 for an execution error of some kind (unparseable project file, etc). Some of the later actions in the list might not actually be "errors", per se, so perhaps we should make this configurable.

I would print the resulting validation warnings/errors to stdout, and execution errors to stderr.

I would give the user the option to output in JSON for ingestion in other tools.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions