diff options
author | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2018-11-01 11:48:03 +0000 |
---|---|---|
committer | Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> | 2018-12-07 11:27:59 +0000 |
commit | 286cf9ae26bb9545bfaf82730355863e38fdbe4a (patch) | |
tree | 02da8a59ebc529a0c8cc5f6a1bb5b5d2e6d52fb0 /scripts/validator | |
parent | f3e0f5d843a4a7266019e1b47de6537eb5aa33cc (diff) |
periject: YAML Validation
Utilise pykwalify to provide a YAML schema for our data files. Define
an initial project schema under projects/ to define our data layout. An
example task data file is provided to demonstrate how the data could be
presented in text form.
A validator is provided which currently simply calls pykwalify. This is
just an initial demonstration of the validation process and can be
expanded upon later to provide automa{t,g}ic commit title processing,
and further business logic can be added with extra tools.
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Diffstat (limited to 'scripts/validator')
-rwxr-xr-x | scripts/validator | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/validator b/scripts/validator new file mode 100755 index 0000000..0913e93 --- /dev/null +++ b/scripts/validator @@ -0,0 +1,15 @@ +#!/bin/sh + +# +# Task file validator +# +# Currently, just calls pykwalify, however we could later anticipate +# expanding to perform SHA1 commit title expansion and more complex +# validation rules. +# At that point, this could potentially become a python script and pull +# in the pykwalify libraries to check internally. +# + +TASKFILE=$1 + +pykwalify -s projects/project.schema.yaml -d $TASKFILE |