Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Jul 3, 2023
1 parent 8dbcba9 commit c7b4e91
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { getEntryIds } from './utils/properties-panel';

import { toSemverMinor } from './utils/version';

import { getDocumentationUrl } from './utils/documentation';

const moddle = new BpmnModdle({
modeler: modelerModdle,
zeebe: zeebeModdle
Expand Down Expand Up @@ -79,6 +81,9 @@ export class Linter {
propertiesPanel: {
entryId: entryIds[ Math.max(0, entryIds.length - 1) ]
},
documentation: {
url: getDocumentationUrl(rule)
},
rule
};
})
Expand Down
15 changes: 15 additions & 0 deletions lib/utils/documentation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const baseUrl = 'http://localhost:3000/docs/next/components/modeler/reference/modeling-guidance';

export function getDocumentationUrl(rule) {
console.log('getting documentation URL', rule);

if (rule === 'camunda-compat/implementation') {
return getUrl('service-task-implementation');
}

return null;
}

function getUrl(fragment) {
return `${ baseUrl }#${ fragment }`;
}

0 comments on commit c7b4e91

Please sign in to comment.