diff --git a/server/gx-workflow-ls-format2/src/profiles.ts b/server/gx-workflow-ls-format2/src/profiles.ts index 4caf1ac..65ee38c 100644 --- a/server/gx-workflow-ls-format2/src/profiles.ts +++ b/server/gx-workflow-ls-format2/src/profiles.ts @@ -10,6 +10,7 @@ import { InputTypeValidationRule } from "./validation/rules/InputTypeValidationR * Defines the minimal set of validation rules for gxformat2 Galaxy workflows. */ export class GxFormat2BasicValidationProfile extends BasicCommonValidationProfile { + public readonly name: string = "GxFormat2 Validation"; public static readonly RULES = new Set([ ...super.RULES, // Add more custom rules specific to gxformat2 workflows here... diff --git a/server/gx-workflow-ls-native/src/profiles.ts b/server/gx-workflow-ls-native/src/profiles.ts index 8af2fdb..1a44e6e 100644 --- a/server/gx-workflow-ls-native/src/profiles.ts +++ b/server/gx-workflow-ls-native/src/profiles.ts @@ -10,6 +10,7 @@ import { WorkflowOutputLabelValidationRule } from "./validation/rules/WorkflowOu * Defines the minimal set of validation rules for Native Galaxy workflows. */ export class NativeBasicValidationProfile extends BasicCommonValidationProfile { + public readonly name: string = "Workflow Validation"; public static readonly RULES = new Set([ ...super.RULES, // Add more custom rules specific to native workflows here... diff --git a/server/packages/server-common/src/languageTypes.ts b/server/packages/server-common/src/languageTypes.ts index 4bfe33b..3c1fd1c 100644 --- a/server/packages/server-common/src/languageTypes.ts +++ b/server/packages/server-common/src/languageTypes.ts @@ -250,7 +250,7 @@ export abstract class LanguageServiceBase implements for (const rule of profile.rules) { const contributedDiagnostics = await rule.validate(documentContext); contributedDiagnostics.forEach((diagnostic) => { - diagnostic.source = profile.name; + diagnostic.source = diagnostic.source ?? profile.name; }); diagnostics.push(...contributedDiagnostics); } diff --git a/server/packages/server-common/src/providers/validation/profiles.ts b/server/packages/server-common/src/providers/validation/profiles.ts index 4bf44f9..53046e4 100644 --- a/server/packages/server-common/src/providers/validation/profiles.ts +++ b/server/packages/server-common/src/providers/validation/profiles.ts @@ -18,7 +18,7 @@ export class NoOpValidationProfile implements ValidationProfile { * Common set of validation rules for basic validation of any workflow format. */ export class BasicCommonValidationProfile implements ValidationProfile { - public readonly name: string = "Basic Validation"; + public readonly name: string = "Workflow Validator"; protected static readonly RULES: Set = new Set([ new TestToolshedValidationRule(DiagnosticSeverity.Error), diff --git a/server/packages/workflow-tests-language-service/src/profiles.ts b/server/packages/workflow-tests-language-service/src/profiles.ts index 785b908..ef8121d 100644 --- a/server/packages/workflow-tests-language-service/src/profiles.ts +++ b/server/packages/workflow-tests-language-service/src/profiles.ts @@ -1,8 +1,5 @@ -import { DiagnosticSeverity, ValidationRule } from "@gxwf/server-common/src/languageTypes"; -import { - BasicCommonValidationProfile, - IWCCommonValidationProfile, -} from "@gxwf/server-common/src/providers/validation/profiles"; +import { DiagnosticSeverity, ValidationProfile, ValidationRule } from "@gxwf/server-common/src/languageTypes"; +import { IWCCommonValidationProfile } from "@gxwf/server-common/src/providers/validation/profiles"; import { RequiredArrayPropertyValidationRule } from "@gxwf/server-common/src/providers/validation/rules"; import { WorkflowInputsValidationRule } from "./validation/rules/WorkflowInputsValidationRule"; import { WorkflowOutputsValidationRule } from "./validation/rules/WorkflowOutputsValidationRule"; @@ -10,9 +7,9 @@ import { WorkflowOutputsValidationRule } from "./validation/rules/WorkflowOutput /** * Defines the minimal set of validation rules for Galaxy Workflow Tests Documents. */ -export class TestDocumentBasicValidationProfile extends BasicCommonValidationProfile { +export class TestDocumentBasicValidationProfile implements ValidationProfile { + public readonly name: string = "Test Document Validator"; public static readonly RULES = new Set([ - ...super.RULES, new WorkflowInputsValidationRule(DiagnosticSeverity.Error), new WorkflowOutputsValidationRule(DiagnosticSeverity.Error), // Add more custom rules specific to native workflows here...