bpmnlint 11.1.0 → 11.3.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.
- package/bin/bpmnlint.js +31 -28
- package/config/correctness.js +9 -0
- package/lib/linter.js +108 -20
- package/lib/resolver/node-resolver.js +27 -3
- package/lib/resolver/static-resolver.js +25 -3
- package/lib/test-rule.js +40 -11
- package/lib/testers/helper.js +2 -1
- package/lib/testers/rule-tester.js +12 -2
- package/lib/traverse.js +9 -6
- package/lib/types.d.ts +78 -2
- package/package.json +8 -5
- package/rules/ad-hoc-sub-process.js +9 -2
- package/rules/conditional-flows.js +9 -2
- package/rules/end-event-required.js +9 -1
- package/rules/event-sub-process-typed-start-event.js +9 -2
- package/rules/fake-join.js +9 -2
- package/rules/global.js +8 -2
- package/rules/helper.js +58 -11
- package/rules/label-required.js +9 -1
- package/rules/link-event.js +7 -2
- package/rules/no-bpmndi.js +36 -9
- package/rules/no-complex-gateway.js +1 -1
- package/rules/no-disconnected.js +9 -4
- package/rules/no-duplicate-sequence-flows.js +10 -4
- package/rules/no-gateway-join-fork.js +8 -2
- package/rules/no-implicit-end.js +8 -2
- package/rules/no-implicit-split.js +9 -3
- package/rules/no-implicit-start.js +8 -1
- package/rules/no-inclusive-gateway.js +1 -1
- package/rules/no-overlapping-elements.js +10 -3
- package/rules/single-blank-start-event.js +9 -2
- package/rules/single-event-definition.js +8 -2
- package/rules/start-event-required.js +9 -1
- package/rules/sub-process-blank-start-event.js +8 -2
- package/rules/superfluous-gateway.js +9 -2
- package/rules/superfluous-termination.js +11 -3
|
@@ -2,13 +2,19 @@ const {
|
|
|
2
2
|
isAny
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* A rule that checks that no implicit split is modeled
|
|
8
12
|
* starting from a task.
|
|
9
13
|
*
|
|
10
|
-
*
|
|
14
|
+
* Users should model the parallel splitting gateway
|
|
11
15
|
* explicitly instead.
|
|
16
|
+
*
|
|
17
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
12
18
|
*/
|
|
13
19
|
module.exports = function() {
|
|
14
20
|
|
|
@@ -32,9 +38,9 @@ module.exports = function() {
|
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
|
|
35
|
-
return {
|
|
41
|
+
return annotateRule('no-implicit-split', {
|
|
36
42
|
check
|
|
37
|
-
};
|
|
43
|
+
});
|
|
38
44
|
|
|
39
45
|
};
|
|
40
46
|
|
|
@@ -3,9 +3,14 @@ const {
|
|
|
3
3
|
isAny
|
|
4
4
|
} = require('bpmnlint-utils');
|
|
5
5
|
|
|
6
|
+
const {
|
|
7
|
+
annotateRule
|
|
8
|
+
} = require('./helper');
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* A rule that checks that an element is not an implicit start (token spawn).
|
|
12
|
+
*
|
|
13
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
9
14
|
*/
|
|
10
15
|
module.exports = function() {
|
|
11
16
|
|
|
@@ -50,5 +55,7 @@ module.exports = function() {
|
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
|
|
53
|
-
return {
|
|
58
|
+
return annotateRule('no-implicit-start', {
|
|
59
|
+
check
|
|
60
|
+
});
|
|
54
61
|
};
|
|
@@ -2,11 +2,18 @@ const {
|
|
|
2
2
|
is
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* Rule that checks if two elements overlap except:
|
|
12
|
+
*
|
|
8
13
|
* - Boundary events overlap their host
|
|
9
14
|
* - Child elements overlap / are on top of their parent (e.g., elements within a subProcess)
|
|
15
|
+
*
|
|
16
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
10
17
|
*/
|
|
11
18
|
module.exports = function() {
|
|
12
19
|
|
|
@@ -44,9 +51,9 @@ module.exports = function() {
|
|
|
44
51
|
elementsOutsideToReport.forEach(element => reporter.report(element.id, 'Element is outside of parent boundary'));
|
|
45
52
|
}
|
|
46
53
|
|
|
47
|
-
return {
|
|
48
|
-
check
|
|
49
|
-
};
|
|
54
|
+
return annotateRule('no-overlapping-elements', {
|
|
55
|
+
check
|
|
56
|
+
});
|
|
50
57
|
};
|
|
51
58
|
|
|
52
59
|
// helpers /////////////////
|
|
@@ -2,9 +2,16 @@ const {
|
|
|
2
2
|
is
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
9
|
+
|
|
5
10
|
/**
|
|
6
11
|
* A rule that checks whether not more than one blank start event
|
|
7
12
|
* exists per scope.
|
|
13
|
+
*
|
|
14
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
8
15
|
*/
|
|
9
16
|
module.exports = function() {
|
|
10
17
|
|
|
@@ -34,8 +41,8 @@ module.exports = function() {
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
return {
|
|
44
|
+
return annotateRule('single-blank-start-event', {
|
|
38
45
|
check
|
|
39
|
-
};
|
|
46
|
+
});
|
|
40
47
|
|
|
41
48
|
};
|
|
@@ -2,9 +2,15 @@ const {
|
|
|
2
2
|
is
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* A rule that verifies that an event contains maximum one event definition.
|
|
12
|
+
*
|
|
13
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
8
14
|
*/
|
|
9
15
|
module.exports = function() {
|
|
10
16
|
|
|
@@ -21,8 +27,8 @@ module.exports = function() {
|
|
|
21
27
|
}
|
|
22
28
|
}
|
|
23
29
|
|
|
24
|
-
return {
|
|
30
|
+
return annotateRule('single-event-definition', {
|
|
25
31
|
check
|
|
26
|
-
};
|
|
32
|
+
});
|
|
27
33
|
|
|
28
34
|
};
|
|
@@ -3,9 +3,15 @@ const {
|
|
|
3
3
|
isAny
|
|
4
4
|
} = require('bpmnlint-utils');
|
|
5
5
|
|
|
6
|
+
const {
|
|
7
|
+
annotateRule
|
|
8
|
+
} = require('./helper');
|
|
9
|
+
|
|
6
10
|
|
|
7
11
|
/**
|
|
8
12
|
* A rule that checks for the presence of a start event per scope.
|
|
13
|
+
*
|
|
14
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
9
15
|
*/
|
|
10
16
|
module.exports = function() {
|
|
11
17
|
|
|
@@ -33,5 +39,7 @@ module.exports = function() {
|
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
36
|
-
return {
|
|
42
|
+
return annotateRule('start-event-required', {
|
|
43
|
+
check
|
|
44
|
+
});
|
|
37
45
|
};
|
|
@@ -2,10 +2,16 @@ const {
|
|
|
2
2
|
is
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
5
9
|
|
|
6
10
|
/**
|
|
7
11
|
* A rule that checks that start events inside a normal sub-processes
|
|
8
12
|
* are blank (do not have an event definition).
|
|
13
|
+
*
|
|
14
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
9
15
|
*/
|
|
10
16
|
module.exports = function() {
|
|
11
17
|
|
|
@@ -31,8 +37,8 @@ module.exports = function() {
|
|
|
31
37
|
});
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
return {
|
|
40
|
+
return annotateRule('sub-process-blank-start-event', {
|
|
35
41
|
check
|
|
36
|
-
};
|
|
42
|
+
});
|
|
37
43
|
|
|
38
44
|
};
|
|
@@ -2,10 +2,17 @@ const {
|
|
|
2
2
|
is
|
|
3
3
|
} = require('bpmnlint-utils');
|
|
4
4
|
|
|
5
|
+
const {
|
|
6
|
+
annotateRule
|
|
7
|
+
} = require('./helper');
|
|
8
|
+
|
|
9
|
+
|
|
5
10
|
/**
|
|
6
11
|
* A rule that checks, whether a gateway has only one source and target.
|
|
7
12
|
*
|
|
8
13
|
* Those gateways are superfluous since they don't do anything.
|
|
14
|
+
*
|
|
15
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
9
16
|
*/
|
|
10
17
|
module.exports = function() {
|
|
11
18
|
|
|
@@ -23,8 +30,8 @@ module.exports = function() {
|
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
|
|
26
|
-
return {
|
|
33
|
+
return annotateRule('superfluous-gateway', {
|
|
27
34
|
check
|
|
28
|
-
};
|
|
35
|
+
});
|
|
29
36
|
|
|
30
37
|
};
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
const {
|
|
2
|
-
is,
|
|
2
|
+
is,
|
|
3
|
+
isAny
|
|
3
4
|
} = require('bpmnlint-utils');
|
|
4
5
|
|
|
6
|
+
const {
|
|
7
|
+
annotateRule
|
|
8
|
+
} = require('./helper');
|
|
9
|
+
|
|
10
|
+
|
|
5
11
|
/**
|
|
6
12
|
* A rule that checks, whether a gateway has only one source and target.
|
|
7
13
|
*
|
|
8
14
|
* Those gateways are superfluous since they don't do anything.
|
|
15
|
+
*
|
|
16
|
+
* @type { import('../lib/types.js').RuleFactory }
|
|
9
17
|
*/
|
|
10
18
|
module.exports = function() {
|
|
11
19
|
|
|
@@ -42,9 +50,9 @@ module.exports = function() {
|
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
|
|
45
|
-
return {
|
|
53
|
+
return annotateRule('superfluous-termination', {
|
|
46
54
|
check
|
|
47
|
-
};
|
|
55
|
+
});
|
|
48
56
|
|
|
49
57
|
};
|
|
50
58
|
|