Check command
Validates models for semantic errors and warnings. This is the command a pipeline
runs to keep a broken model out of review: point it at files, directories or glob
patterns, and it reports what it finds. With --warnings-as-errors a warning is
enough to fail the run.
Basic usage
Validate specific files
syside check /path/to/analyzed_model.sysml /path/to/analyzed_model_2.sysml
Validate all files in current directory recursively
syside checkNote
When using
syside checkwithout explicitly listing out the files, Syside ignores hidden files and files from hidden directories (starting with., e.g..venvor.git). To analyze files from these directories, list them explicitly.Validate files matching a glob pattern
syside check "models/**/*.sysml"
Path arguments can be files, directories, or glob patterns (
*,**,?,{a,b},[a-z]), mixed freely. Everysysidecommand discovers files with the same rules.
Output
If Syside does not find any errors or warnings, there will be no output. If Syside does find anything, the output will look similar to this:
/path/to/analyzed_model.sysml:5:28: error (type-error): 'Non-Conforming Types 1'::a does not conform to ScalarValues::String
5 | attribute b : String = a;
| ^
/path/to/analyzed_model.sysml:12:30: error (type-error): ScalarValues::Integer does not conform to ScalarValues::Positive
12 | attribute b : Positive = -42;
| ^^^
/path/to/analyzed_model.sysml:30:27: error (type-error): Collect::A does not conform to Collect::B
30 | attribute b : B [*] = (1..10)->collect { in attribute x : Positive; new A(x) };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/path/to/analyzed_model.sysml:38:34: error (type-error): ScalarValues::Integer does not conform to ScalarValues::Positive
38 | attribute b : Positive [*] = (-1..10)->select { true };
| ^^^^^^^^^^^^^^^^^^^^^^^^^
The output contains the source file path, line number, character number, diagnostic code, message, and code snippet.
Available options
Option |
Description |
|---|---|
|
Display the help message with all available flags and short descriptions |
|
Choose which files to validate: |
|
Treat warnings as errors, exiting with a non-zero code if any warning is found |
|
Suppress main output |
|
Print all analyzed files and the number of diagnostics found in each |
|
Print how long analysis took per file. Combine with |
|
Colorize output: |
|
Write |
|
Path to a |
|
Concurrency level, 1 to 8 (default: 4) |
|
Additional paths to include as external libraries |
|
Paths or glob patterns to exclude from analysis |
|
Path to a |
|
Path to the |
|
Automatic crash report handling: |
Usage examples
Run validation in CI/CD pipeline:
syside check