Check TF metadata in project¶
Contents:
‘check-metadata’ goal (squash-ta:check-metadata)¶
As goal “list”, the goal “check-metadata” searches and checks if all metadata in a SKF project respect the conventions for writing and using Squash TF metadata (see Metadata section for more information about Metadata syntax conventions).
mvn squash-ta:check-metadata
The goal will check through the project, collect all the metadata error(s) if any and lead to a FAILURE. Otherwise, a SUCCESS result will be obtained (however, no JSON report will be created with a successful check-metadata goal).
Metadata error(s), if found, will be grouped by test names.
When a SKF project has duplicate values in a multi-value key on a given test, the ‘check-metadata’ goal will create a WARNING message in the console.
‘check-metadata’ goal with Unicity checking¶
In addition to the normal syntax checking, you can insert the tf.metadata.check property after the goal “check-metadata” to check the unicity of each Metadata Key - Value pair.
mvn squash-ta:check-metadata -Dtf.metadata.check=[valueUnicity]
If there are metadata Key - Value duplicate(s) in the SKF project (even if the syntax is OK), a FAILURE result will be obtained.
‘check-metadata’ goal with Unicity checking for specific Keys¶
You can even check the unicity of each Metadata Key - Value pair with just some specific Keys by inserting the second property tf.metadata.check.key after the first one mentioned above.
mvn squash-ta:check-metadata -Dtf.metadata.check=[valueUnicity] -Dtf.metadata.check.keys=[xxx,yyy,zzz]
Important
In the bracket, the key list MUST be a string of characters composed by the concatenation of 1 to n keys separated by commas : -Dtf.metadata.check.keys=[xxx,yyy,zzz]
If the list is surrounded by double quotes, spaces are allowed : -Dtf.metadata.check.keys=”[xxx, yyy, zzz]”
It is NOT allowed to have two commas without any key OR only spaces/tabulations between them (ex: -Dtf.metadata.check.keys=”[xxx, ,yyy,,zzz]”).
Key list is NOT allowed to be either uninitiated or empty (ex: -Dtf.metadata.check.keys= OR -Dtf.metadata.check.keys=[]).
For each searched metadata key, if there are Key - Value duplicate(s) in the SKF project, a FAILURE result will be obtained.
Note
If searched metadata key(s) are not found in any Test files, a WARNING message will be raised in the console.