Skip to content

Commit

Permalink
Add IWC rule to check all steps are documented
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Jun 22, 2024
1 parent d9d5fa3 commit a8be7c4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion server/gx-workflow-ls-format2/src/profiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

/**
Expand Down Expand Up @@ -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...
]);

Expand Down

0 comments on commit a8be7c4

Please sign in to comment.