From f8531be6dcca1d8f90dcc49d48bfa2abcc796c42 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Thu, 19 Aug 2021 22:47:26 +0200 Subject: [PATCH] Handle errors in comments parsing from metadata [skip ci] --- source/app/metrics/metadata.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/metrics/metadata.mjs b/source/app/metrics/metadata.mjs index e300109c..7f7ab9e5 100644 --- a/source/app/metrics/metadata.mjs +++ b/source/app/metrics/metadata.mjs @@ -194,7 +194,7 @@ metadata.plugin = async function({__plugins, name, logger}) { Object.entries(inputs).map(([key, value]) => [ key, { - comment:comments[key] ?? "", + comment:comments[key] ?? `# ${value.description}`, descriptor:yaml.dump({[key]:Object.fromEntries(Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)))}, {quotingType:'"', noCompatMode:true}), }, ]),