From 286cf9ae26bb9545bfaf82730355863e38fdbe4a Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Thu, 1 Nov 2018 11:48:03 +0000 Subject: 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 --- scripts/validator | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 scripts/validator (limited to 'scripts/validator') 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 -- cgit v1.2.3