Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Oct 10, 2023
1 parent 1ca7630 commit 190492b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/language/validation/other/declarations/placeholders.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {
isSdsAssignment,
isSdsBlock,
isSdsParameter, isSdsPlaceholder,
isSdsParameter,
isSdsPlaceholder,
isSdsReference,
isSdsStatement,
SdsPlaceholder,
Expand All @@ -27,13 +28,13 @@ export const placeholdersMustNotBeAnAlias = (node: SdsPlaceholder, accept: Valid

const referenceTarget = rhs.target.ref;
if (isSdsParameter(referenceTarget) || isSdsPlaceholder(referenceTarget)) {
accept('error', "Aliases are not allowed to provide a cleaner graphical view.", {
accept('error', 'Aliases are not allowed to provide a cleaner graphical view.', {
node,
property: 'name',
code: CODE_PLACEHOLDER_ALIAS,
});
}
}
};

export const placeholderShouldBeUsed =
(services: SafeDsServices) => (node: SdsPlaceholder, accept: ValidationAcceptor) => {
Expand Down
4 changes: 1 addition & 3 deletions src/language/validation/safe-ds-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ export const registerValidationChecks = function (services: SafeDsServices) {
],
SdsParameterList: [parameterListMustNotHaveRequiredParametersAfterOptionalParameters],
SdsPipeline: [pipelineMustContainUniqueNames],
SdsPlaceholder: [
placeholdersMustNotBeAnAlias,
placeholderShouldBeUsed(services)],
SdsPlaceholder: [placeholdersMustNotBeAnAlias, placeholderShouldBeUsed(services)],
SdsReference: [
referenceTargetMustNotBeAnnotationPipelineOrSchema,
referenceTargetShouldNotBeDeprecated(services),
Expand Down

0 comments on commit 190492b

Please sign in to comment.