@camunda/linting 0.9.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -103,6 +103,10 @@ export function getErrorMessage(report, executionPlatform, executionPlatformVers
|
|
|
103
103
|
return getPropertyValueDuplicatedErrorMessage(report);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
if (type === ERROR_TYPES.PROPERTY_VALUE_REQUIRED) {
|
|
107
|
+
return getPropertyValueRequiredErrorMessage(report);
|
|
108
|
+
}
|
|
109
|
+
|
|
106
110
|
if (type === ERROR_TYPES.EXPRESSION_REQUIRED) {
|
|
107
111
|
return getExpressionRequiredErrorMessage(report);
|
|
108
112
|
}
|
|
@@ -166,6 +170,29 @@ function getPropertyValueDuplicatedErrorMessage(report) {
|
|
|
166
170
|
return message;
|
|
167
171
|
}
|
|
168
172
|
|
|
173
|
+
function getPropertyValueRequiredErrorMessage(report) {
|
|
174
|
+
const {
|
|
175
|
+
data,
|
|
176
|
+
message
|
|
177
|
+
} = report;
|
|
178
|
+
|
|
179
|
+
const {
|
|
180
|
+
node,
|
|
181
|
+
property,
|
|
182
|
+
parentNode
|
|
183
|
+
} = data;
|
|
184
|
+
|
|
185
|
+
if (is(node, 'bpmn:Process') && property === 'isExecutable') {
|
|
186
|
+
if (parentNode && is(parentNode, 'bpmn:Participant')) {
|
|
187
|
+
return 'One <Process> must be <Executable>';
|
|
188
|
+
} else {
|
|
189
|
+
return 'A <Process> must be <Executable>';
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return message;
|
|
194
|
+
}
|
|
195
|
+
|
|
169
196
|
function getExtensionElementNotAllowedErrorMessage(report, executionPlatform, executionPlatformVersion) {
|
|
170
197
|
const {
|
|
171
198
|
data,
|
|
@@ -51,6 +51,10 @@ export function getEntryIds(report) {
|
|
|
51
51
|
path
|
|
52
52
|
} = report;
|
|
53
53
|
|
|
54
|
+
if (isPropertyError(data, 'isExecutable')) {
|
|
55
|
+
return [ 'isExecutable' ];
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
if (isExtensionElementRequiredError(data, 'zeebe:CalledDecision', 'bpmn:BusinessRuleTask')) {
|
|
55
59
|
return [ 'businessRuleImplementation' ];
|
|
56
60
|
}
|
|
@@ -203,6 +207,16 @@ export function getErrorMessage(id, report) {
|
|
|
203
207
|
return;
|
|
204
208
|
}
|
|
205
209
|
|
|
210
|
+
if (id === 'isExecutable') {
|
|
211
|
+
const { parentNode } = data;
|
|
212
|
+
|
|
213
|
+
if (parentNode && is(parentNode, 'bpmn:Participant')) {
|
|
214
|
+
return 'One process must be executable.';
|
|
215
|
+
} else {
|
|
216
|
+
return 'Process must be executable.';
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
206
220
|
if (id === 'businessRuleImplementation') {
|
|
207
221
|
return 'Implementation must be defined.';
|
|
208
222
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camunda/linting",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Linting for Camunda Platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"bpmn-moddle": "^7.1.3",
|
|
29
29
|
"bpmnlint": "^8.0.0",
|
|
30
|
-
"bpmnlint-plugin-camunda-compat": "^0.
|
|
30
|
+
"bpmnlint-plugin-camunda-compat": "^0.15.1",
|
|
31
31
|
"bpmnlint-utils": "^1.0.2",
|
|
32
32
|
"min-dash": "^4.0.0",
|
|
33
33
|
"min-dom": "^4.0.1",
|