target-namespace.js 368 B

123456789101112131415161718192021
  1. const {
  2. is
  3. } = require('bpmnlint-utils');
  4. /**
  5. * Rule that reports missing targetNamespace on bpmn:Definitions.
  6. */
  7. module.exports = function() {
  8. function check(node, reporter) {
  9. if (is(node, 'bpmn:Definitions') && !node.targetNamespace) {
  10. reporter.report(node.id, 'Element is missing targetNamespace');
  11. }
  12. }
  13. return {
  14. check: check
  15. };
  16. };