@@ -52,6 +52,7 @@ import {
52
52
assigneeAssignedResultShouldNotBeDeprecated ,
53
53
namedTypeDeclarationShouldNotBeDeprecated ,
54
54
referenceTargetShouldNotBeDeprecated ,
55
+ requiredParameterMustNotBeDeprecated ,
55
56
} from './builtins/deprecated.js' ;
56
57
import {
57
58
annotationCallAnnotationShouldNotBeExperimental ,
@@ -64,6 +65,12 @@ import { placeholderShouldBeUsed } from './other/declarations/placeholders.js';
64
65
import { segmentParameterShouldBeUsed , segmentResultMustBeAssignedExactlyOnce } from './other/declarations/segments.js' ;
65
66
import { lambdaParameterMustNotHaveConstModifier } from './other/expressions/lambdas.js' ;
66
67
import { indexedAccessesShouldBeUsedWithCaution } from './experimentalLanguageFeature.js' ;
68
+ import { requiredParameterMustNotBeExpert } from './builtins/expert.js' ;
69
+ import {
70
+ callableTypeParametersMustNotBeAnnotated ,
71
+ callableTypeResultsMustNotBeAnnotated ,
72
+ lambdaParametersMustNotBeAnnotated ,
73
+ } from './other/declarations/annotationCalls.js' ;
67
74
68
75
/**
69
76
* Register custom validation checks.
@@ -97,7 +104,9 @@ export const registerValidationChecks = function (services: SafeDsServices) {
97
104
SdsCallableType : [
98
105
callableTypeMustContainUniqueNames ,
99
106
callableTypeMustNotHaveOptionalParameters ,
107
+ callableTypeParametersMustNotBeAnnotated ,
100
108
callableTypeParameterMustNotHaveConstModifier ,
109
+ callableTypeResultsMustNotBeAnnotated ,
101
110
] ,
102
111
SdsClass : [ classMustContainUniqueNames ] ,
103
112
SdsClassBody : [ classBodyShouldNotBeEmpty ] ,
@@ -109,15 +118,19 @@ export const registerValidationChecks = function (services: SafeDsServices) {
109
118
SdsExpressionLambda : [ expressionLambdaMustContainUniqueNames ] ,
110
119
SdsFunction : [ functionMustContainUniqueNames , functionResultListShouldNotBeEmpty ] ,
111
120
SdsIndexedAccess : [ indexedAccessesShouldBeUsedWithCaution ] ,
112
- SdsLambda : [ lambdaParameterMustNotHaveConstModifier ] ,
121
+ SdsLambda : [ lambdaParametersMustNotBeAnnotated , lambdaParameterMustNotHaveConstModifier ] ,
113
122
SdsMemberAccess : [ memberAccessNullSafetyShouldBeNeeded ( services ) ] ,
114
123
SdsModule : [ moduleDeclarationsMustMatchFileKind , moduleWithDeclarationsMustStatePackage ] ,
115
124
SdsNamedType : [
116
125
namedTypeDeclarationShouldNotBeDeprecated ( services ) ,
117
126
namedTypeDeclarationShouldNotBeExperimental ( services ) ,
118
127
namedTypeTypeArgumentListShouldBeNeeded ,
119
128
] ,
120
- SdsParameter : [ parameterMustHaveTypeHint ] ,
129
+ SdsParameter : [
130
+ parameterMustHaveTypeHint ,
131
+ requiredParameterMustNotBeDeprecated ( services ) ,
132
+ requiredParameterMustNotBeExpert ( services ) ,
133
+ ] ,
121
134
SdsParameterList : [ parameterListMustNotHaveRequiredParametersAfterOptionalParameters ] ,
122
135
SdsPipeline : [ pipelineMustContainUniqueNames ] ,
123
136
SdsPlaceholder : [ placeholderShouldBeUsed ( services ) ] ,
0 commit comments