Skip to main content

Developpement

When developing a Mélodium program, in addition to the run allowing the actual execution of a program, there is the check command.

The melodium check command allows you to fully check the syntax and logic of a program, without real execution. Verification runs through an entire program from a given entry point and ensures the logic of each of the individual elements as well as the coherence of all of them and their interactions.

info

During a melodium run call, a precheck strictly equivalent to melodium check is performed. Mélodium uses the fail-fast system approach to prevent any erroneous program launch.

Use in scripts and continuous integration

The melodium check command returns a non-0 exit code when the check fails. It is thus possible to rely on it within scripts or CI/CD steps.

$ melodium check good_program.mel
$ echo $?
0
$ melodium check wrong_program.mel
failure: <some error>
$ echo $?
1