bpmn-io / bpmnlint

Validate BPMN diagrams based on configurable lint rules.
MIT License
119 stars 36 forks source link

Indicate rule evaluation error #108

Closed philippfromme closed 1 year ago

philippfromme commented 1 year ago

When a lint rule throws an acutal error instead of reporting one the message is set to Rule error: .... Other than that prefix, there is no way to tell whether an actual error occurred. I'd like something like a flag indicating that there was an actual error. For example:

} catch (e) {
  console.error('rule <' + name + '> failed with error: ', e);

  return [
    {
      message: 'Rule error: ' + e.message,
      category: 'error',
      isRuleError: true
    }
  ];
}

Related to https://github.com/camunda/camunda-modeler/issues/3637

nikku commented 1 year ago

Could also be a separate category rule-evaluation-error?

philippfromme commented 1 year ago

Yes, I was thinking about that. It's entirely separate and only there to not blow up the whole linter because of one rule failing.

nikku commented 1 year ago

I'd be in for a separate category in this case. Call it failure or rule-evaluation-error.

nikku commented 1 year ago

Closed via https://github.com/bpmn-io/bpmnlint/commit/820e954c8ab3bfac34a5e1fede07c4a1cf0c54ae