zxf-pm/zxf-ui/bpmnlint-plugin-local/rules/target-namespace.js

21 lines
368 B
JavaScript
Raw Normal View History

2023-05-19 08:34:24 +00:00
const {
is
} = require('bpmnlint-utils');
/**
* Rule that reports missing targetNamespace on bpmn:Definitions.
*/
module.exports = function() {
function check(node, reporter) {
if (is(node, 'bpmn:Definitions') && !node.targetNamespace) {
reporter.report(node.id, 'Element is missing targetNamespace');
}
}
return {
check: check
};
};