-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Be able to provide documentation URL for custom lint rules #4491
Comments
@nikku Please let me know your thoughts on this enhancement? Can I proceed with making the changes and raise PR? |
@kmannuru I think being able to provide custom documentation URLs would be a great enhancement. Let's consider some options:
|
@nikku Thanks for your feedback. Here's is what I plan to do.
Please let me know your thoughts on this approach and let me know if any issues. Thanks. |
@kmannuru Via the proposed How would you distribute the file? Via a custom Camunda Modeler build? |
@nikku The changes i'm planning to make will not override the documentation url in the properties panel. The proposed changes will only override the documentation url in the linting error messages. We're going to enhance the function to read the documentationUrl map we're going to build and return the mapped documentationUrl configured to the rule. |
I got this. But what about simply shipping documentation URL via the rule itself (option |
I just had a look at how ESLint custom rules work, and the documentation URL is part of the rule definition as suggested by @nikku in |
@kmannuru given the feedback @nikku and I shared, I'd like to modify the issue to use the solution sketch from |
@barmac I think the feature request is valid, regardless, we just disagree on the direction. I rephrased the issue so we can leave it open. |
Thanks for the feedback. Just want to make sure if we can accomplish above using the approach B that you've mentioned. |
@kmannuru Yes, what you show will be accomplished using above mechanism, through the following:
Cf. camunda/linting#121 (comment) and camunda/linting#121 (comment) for additional discussion of that "meta-data attached to rules + reports" approach. |
Updated issue based on the confirmed solution sketch. |
@nikku @barmac I tried passing the url through metadata in the rule.
I've included above meta data information. But the url didn't get added to the linting error message. However I'm able to get this feature working following just by adding metadata to the rule and updating the linting module. Here's the proposed changes.
I've validated the changes in my local and I'm able to see the documentation url added to the linting error message. |
We want the meta-data to attach automatically, this likely requires a change in bpmnlint. |
Can you please help provide more insight regarding what we may need to update to attach the metadata automatically.Thanks. |
@nikku I've created a draft PR with the changes. Can you please help review the changes. |
@kmannuru If you're still open to contribute this change, let's move along the desired solution sketch, camunda/linting#121 (comment). |
Core support will ship via bpmn-io/bpmnlint#165. |
Problem you would like to solve
Camunda Desktop modeler currently displays lint messages. Currently some lint rules are configured to show lint messages along with the documentation url. The documentation urls are currently hardcoded in camunda linting package where the documentation url will only display for some specific linting rules. When implementing custom lint rules currently the linting module doesn't support the configuration to return the custom documentation url.
I would like to create my own lint rules, and define a custom documentation URL with them, so they are picked up by the editor.
Proposed solution
Alternatives considered
See #4491 (comment) for discussion of different approaches.
camunda-modeler repo:
https://github.com/camunda/camunda-modeler/blob/develop/client/src/app/TabsProvider.js#L206
https://github.com/camunda/camunda-modeler/blob/develop/client/src/app/TabsProvider.js#L259
linting repo:
https://github.com/camunda/linting/blob/main/lib/Linter.js#L34
https://github.com/camunda/linting/blob/main/lib/Linter.js#L106
https://github.com/camunda/linting/blob/main/lib/utils/documentation.js#L3
Additional context
No response
The text was updated successfully, but these errors were encountered: