bpmnlint-plugin-camunda-compat 0.2.0 → 0.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/README.md CHANGED
@@ -23,8 +23,8 @@ To validate a diagram it must be pinned to a particular execution platform via t
23
23
 
24
24
  ## Resources
25
25
 
26
- * [Documentation](https://github.com/camunda/bpmnlint-plugin-camunda-compat/tree/master/docs/rules)
27
26
  * [Issues](https://github.com/camunda/bpmnlint-plugin-camunda-compat/issues)
27
+ * BPMN coverage for [Camunda Cloud](https://docs.camunda.io/docs/reference/bpmn-processes/bpmn-coverage/) and [Camunda Platform](https://docs.camunda.org/manual/latest/reference/bpmn20/)
28
28
 
29
29
 
30
30
  ## License
package/index.js CHANGED
@@ -1,19 +1,43 @@
1
1
  module.exports = {
2
2
  configs: {
3
+ all: {
4
+ rules: {
5
+ 'camunda-cloud-1-0': 'error',
6
+ 'camunda-cloud-1-1': 'error',
7
+ 'camunda-cloud-1-2': 'error',
8
+ 'camunda-cloud-1-3': 'error',
9
+ 'camunda-cloud-1-4': 'error',
10
+ 'camunda-platform-7-15': 'error',
11
+ 'camunda-platform-7-16': 'error',
12
+ 'camunda-platform-7-17': 'error'
13
+ }
14
+ },
3
15
  recommended: {
4
16
  rules: {
5
17
  'camunda-cloud-1-0': 'error',
6
18
  'camunda-cloud-1-1': 'error',
7
19
  'camunda-cloud-1-2': 'error',
8
- 'camunda-cloud-1-3': 'error'
20
+ 'camunda-cloud-1-3': 'error',
21
+ 'camunda-cloud-1-4': 'error',
22
+ 'camunda-platform-7-15': 'error',
23
+ 'camunda-platform-7-16': 'error',
24
+ 'camunda-platform-7-17': 'error'
9
25
  }
10
26
  },
11
- all: {
27
+ cloud: {
28
+ rules: {
29
+ 'camunda-cloud-1-0': 'error',
30
+ 'camunda-cloud-1-1': 'error',
31
+ 'camunda-cloud-1-2': 'error',
32
+ 'camunda-cloud-1-3': 'error',
33
+ 'camunda-cloud-1-4': 'error'
34
+ }
35
+ },
36
+ platform: {
12
37
  rules: {
13
- 'camunda-cloud-1-0': 'warn',
14
- 'camunda-cloud-1-1': 'warn',
15
- 'camunda-cloud-1-2': 'warn',
16
- 'camunda-cloud-1-3': 'warn'
38
+ 'camunda-platform-7-15': 'error',
39
+ 'camunda-platform-7-16': 'error',
40
+ 'camunda-platform-7-17': 'error'
17
41
  }
18
42
  }
19
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmnlint-plugin-camunda-compat",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "A bpmnlint plug-in for Camunda Cloud and Platform compatibility",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "devDependencies": {
24
24
  "bpmn-moddle": "^7.1.2",
25
25
  "bpmnlint": "^6.1.0",
26
- "chai": "^4.2.0",
26
+ "chai": "^4.3.5",
27
27
  "mocha": "^5.2.0",
28
28
  "modeler-moddle": "^0.1.0",
29
29
  "zeebe-bpmn-moddle": "^0.10.0"
@@ -82,7 +82,10 @@ module.exports = [
82
82
  },
83
83
  {
84
84
  type: 'bpmn:SubProcess',
85
- check: hasNoLoopCharacteristics
85
+ check: checkSome(
86
+ hasNoLoopCharacteristics,
87
+ hasLoopCharacteristicsOfType('bpmn:MultiInstanceLoopCharacteristics')
88
+ )
86
89
  },
87
90
  {
88
91
  type: 'bpmn:UserTask',
@@ -91,4 +94,4 @@ module.exports = [
91
94
  hasLoopCharacteristicsOfType('bpmn:MultiInstanceLoopCharacteristics')
92
95
  )
93
96
  }
94
- ];
97
+ ];
@@ -0,0 +1,5 @@
1
+ const camundaCloud13Checks = require('./camunda-cloud-1-3-checks');
2
+
3
+ module.exports = [
4
+ ...camundaCloud13Checks
5
+ ];
@@ -0,0 +1,5 @@
1
+ const { createRule } = require('./utils/rule');
2
+
3
+ const checks = require('./camunda-cloud-1-4-checks');
4
+
5
+ module.exports = createRule('Camunda Cloud', '1.4', checks);
@@ -0,0 +1,3 @@
1
+ const { createNoopRule } = require('./utils/rule');
2
+
3
+ module.exports = createNoopRule();
@@ -0,0 +1,3 @@
1
+ const { createNoopRule } = require('./utils/rule');
2
+
3
+ module.exports = createNoopRule();
@@ -0,0 +1,3 @@
1
+ const { createNoopRule } = require('./utils/rule');
2
+
3
+ module.exports = createNoopRule();
@@ -41,7 +41,15 @@ module.exports.createRule = function(ruleExecutionPlatform, ruleExecutionPlatfor
41
41
  }
42
42
  };
43
43
  };
44
- }
44
+ };
45
+
46
+ module.exports.createNoopRule = function() {
47
+ return () => {
48
+ return {
49
+ check: () => false
50
+ };
51
+ };
52
+ };
45
53
 
46
54
  /**
47
55
  * @param {ModdleElement} node