From a8be7c43f3eb0ad7d043a819b487630a9e439ed1 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Sat, 22 Jun 2024 15:43:27 +0200 Subject: [PATCH] Add IWC rule to check all steps are documented --- server/gx-workflow-ls-format2/src/profiles.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/gx-workflow-ls-format2/src/profiles.ts b/server/gx-workflow-ls-format2/src/profiles.ts index 65ee38c..c925738 100644 --- a/server/gx-workflow-ls-format2/src/profiles.ts +++ b/server/gx-workflow-ls-format2/src/profiles.ts @@ -3,7 +3,10 @@ import { BasicCommonValidationProfile, IWCCommonValidationProfile, } from "@gxwf/server-common/src/providers/validation/profiles"; -import { RequiredPropertyValidationRule } from "@gxwf/server-common/src/providers/validation/rules"; +import { + ChildrenRequiredPropertyValidationRule, + RequiredPropertyValidationRule, +} from "@gxwf/server-common/src/providers/validation/rules"; import { InputTypeValidationRule } from "./validation/rules/InputTypeValidationRule"; /** @@ -37,6 +40,14 @@ export class GxFormat2IWCValidationProfile extends IWCCommonValidationProfile { "The workflow is not documented. Documenting workflows helps users understand the purpose of the workflow." ), new InputTypeValidationRule(DiagnosticSeverity.Error), + new ChildrenRequiredPropertyValidationRule( + "steps", + "doc", + true, + DiagnosticSeverity.Warning, + "The step is not documented. Documenting steps helps users understand the purpose of the step." + ), + // Add more custom rules specific to gxformat2 workflows here... ]);