SDML(1)

πŸ“¦
version 0.3.2+20250310 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

✨ sdml validate ✨

okay bestie, welcome to the SDML(1) page, section 1, User Commands β€” yes this is the manpage for sdml validate and yes it's lowkey the most useful one, come with me πŸ’…


πŸ’– NAME πŸ’–

sdml validate β€” Validate that a module is correct.

🌸 SYNOPSIS 🌸

sdml validate [OPTIONS] [MODULE]

πŸ¦‹ DESCRIPTION πŸ¦‹

Validate that a module is correct.

This command provides deep validation of a module's content, including errors, warnings, and linter-like advice. Checks are run not only on the initial module, but it's transitively loaded dependencies. (yes bestie, it follows the whole dependency tree, no cap, it's giving thorough πŸ‘‘)

By default the command only shows diagnostics with severity bug and error, but warning, notes, and help can be output with the --level argument. This argument also takes the values none and all.

so here's the vibe when you crank it all the way up β€” the raw text of these examples got a lil glitched with ??? where the terminal lost some characters, that's literally how it came in, don't @ me πŸ™ˆ

??? sdml validate --level all -i examples/errors/i0506.sdm
note[I0506]: identifier not using preferred casing ??????
examples/errors/i0506.sdm:1:8 ??? 1 ??? module Example
<https://example.com/api> is ???        ^^^^^^^ this identifier ??? =
expected snake case (snake_case) = help: for more details, see
<https://sdml.io/errors/#I0506>

note[I0506]: identifier not using preferred casing ??????
examples/errors/i0506.sdm:3:13 ??? 3 ???  structure access_record is ???
^^^^^^^^^^^^^ this identifier ??? = expected upper camel case
(UpperCamelCase) = help: for more details, see
<https://sdml.io/errors/#I0506>

The check-constraints option turns on (it's default is off) the checking of constraints for correctness.

Additionally, a short-form option will generate diagnostics using a CSV format that is easier for tools to parse. The fields in this format are: severity, file name, start line, start column, end line, end column, error code, and message. πŸŽ€

??? sdml validate --level all --short-form -i
examples/errors/i0506.sdm
note,examples/errors/i0506.sdm,1,8,1,15,I0506,identifier not using
preferred casing
note,examples/errors/i0506.sdm,3,13,3,26,I0506,identifier not using
preferred casing

🫢 Arguments 🫢

  • [MODULE] β€” SDML module, loaded using the standard resolver

πŸ‘‘ OPTIONS πŸ‘‘

  • -l, --level <LEVEL> β€” how loud do you want this thing to be? Possible values:
    • none: Turn off reporting
    • bugs: Implementation bugs
    • errors: Module errors
    • warnings: Module warnings
    • notes: Module informational notes
    • help: Style and other help
    • all: Turn it all on

[default: warnings]

  • -c, --check-constraints β€” Enable the checking of constraints in the model
  • -s, --short-form β€” Enable the short form (CSV) output
  • -o, --output <OUTPUT> β€” File name to write to, or - to write to stdout

[default: -]

  • -i, --input <INPUT> β€” Input SDML file name to read from, or - to read from stdin

[default: -]

  • -h, --help β€” Print help (see a summary with -h)
  • -V, --version β€” Print version

pro tip bestie: - is literally the "just talk to stdin/stdout like a normal unix girlie" shortcut for both --input and --output. iconic behavior fr fr 🫢

and that's the whole page!! this drop is sdml validate version 0.3.2+20250310, dated October 2025, and it ate, periodt πŸ’œβœ¨

πŸ“¦ where this page comes from