|
1 .. _cli-action-validate: |
|
2 |
|
3 ConE validate action |
|
4 ==================== |
|
5 |
|
6 The validate action can be used to validate individual ConfML and ImplML files, |
|
7 or an entire configuration. See also :ref:`validation-overview`. |
|
8 |
|
9 Examples |
|
10 -------- |
|
11 |
|
12 **Validating a single ConfML file**:: |
|
13 |
|
14 cone validate --confml-file something.confml |
|
15 |
|
16 This will validate the specified ConfML file and generate a report in |
|
17 ``validation_report.html`` using the default html report template. If you would like to |
|
18 produce an xml report ``validation_report.xml`` (which is based on Diamonds format) use the following command instead:: |
|
19 |
|
20 cone validate --confml-file something.confml --report-type xml |
|
21 |
|
22 * Example output `Validation report for Diamonds <../_static/report.xml>`_ |
|
23 |
|
24 **Validating multiple ConfML files**:: |
|
25 |
|
26 cone validate --confml-file file1.confml --confml-file file2.confml |
|
27 |
|
28 This will validate the list of specified ConfML files with --confml-file option. Several Implml files can be validated correspondingly with |
|
29 --implml-file option. |
|
30 |
|
31 **Validating an entire configuration**:: |
|
32 |
|
33 cone validate --project myproject --configuration myconfig.confml |
|
34 |
|
35 This will find all ConfML and ImplML files in the configuration and validate |
|
36 them, generating a report into ``validation_report.html``. The command output |
|
37 might look something like this:: |
|
38 |
|
39 C:\>cone validate --project myproject --configuration myconfig.confml |
|
40 Running action validate |
|
41 Project: myproject |
|
42 Configuration: myconfig.confml |
|
43 Finding ConfML files in configuration... |
|
44 282 ConfML file(s) |
|
45 2 problem(s) while parsing |
|
46 Performing XML schema validation on ConfML files... |
|
47 40 problem(s) |
|
48 Validating ConfML model... |
|
49 34 problem(s) |
|
50 Finding ImplML files in configuration... |
|
51 Found 393 supported files |
|
52 Performing XML schema validation on ImplML files... |
|
53 7 problem(s) |
|
54 Parsing implementations... |
|
55 Validating implementations... |
|
56 1 problem(s) |
|
57 Total 84 problem(s) after filtering |
|
58 Generating report... |
|
59 Generated report to 'validation_report.html' |
|
60 |
|
61 |
|
62 **Validating only ConfML files in a configuration**:: |
|
63 |
|
64 cone validate --project myproject --configuration myconfig.confml --include-filter *.confml |
|
65 |
|
66 This will run the same validation as in the previous example, except that |
|
67 ImplML files are not validated. |
|
68 |
|
69 **Validating only ImplML files in a configuration**:: |
|
70 |
|
71 cone validate --project myproject --configuration myconfig.confml --include-filter *.implml |
|
72 |
|
73 **Performing only schema validation**:: |
|
74 |
|
75 cone validate --project myproject --configuration myconfig.confml --include-filter schema |
|
76 |
|
77 Options list |
|
78 ------------ |
|
79 |
|
80 --confml-file=FILE Validate only the given single ConfML file. |
|
81 --implml-file=FILE Validate only the given single ImplML file. |
|
82 --template=FILE Template used in report generation. Example: |
|
83 --template report_template.html. |
|
84 --report=FILE Specifies the location of the validation report. |
|
85 Example --report report.html. |
|
86 --report-type=TYPE The type of the report to generate. This is a |
|
87 convenience switch for setting the used template. If |
|
88 --template is given, this option has no effect. |
|
89 Possible values: |
|
90 xml - Generate an xml report |
|
91 html - Generate html report |
|
92 --dump-schema-files=DIR |
|
93 Dump the XML schema files used for validation into the |
|
94 specified directory. |
|
95 --exclude-filter=EXCLUDE_FILTER |
|
96 Exclude validation problems by given filter. Examples: |
|
97 --exclude-filter=schema, --exclude- |
|
98 filter=schema.implml, --exclude-filter=schema.confml, |
|
99 --exclude-filter=schema.implml.ruleml |
|
100 --include-filter=INCLUDE_FILTER |
|
101 Include validation problems by given filter.Examples: |
|
102 --include-filter=schema.implml, --include- |
|
103 filter=schema.implml.ruleml |