Skip to content
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

Update the documentation url path to read from metadata #4829

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/app/panel/tabs/linting/LintingTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function LintingTabItem(props) {

const {
category,
documentation = {},
meta = {},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = {},
meta,

Given the later line:

  const documentationUrl = meta?.documentation?.url;  

We get away with meta not existing.

message,
rule
} = report;
Expand All @@ -109,7 +109,7 @@ function LintingTabItem(props) {
</div>;
}

const { url: documentationUrl = null } = documentation;
const documentationUrl = meta?.documentation?.url;
const reportName = getReportName(report);

return <div
Expand Down
6 changes: 4 additions & 2 deletions client/src/app/panel/tabs/linting/__tests__/LintingTabSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ describe('<LintingTab>', function() {
name: 'Foo',
message: 'Foo message',
rule: 'foo-rule',
documentation: {
url: 'https://foo.bar'
meta: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this requires adjustment in @camunda/linting to ensure that custom URLs are appropriately injected:

Copy link
Member

@nikku nikku Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it, camunda/linting#129 should be the way to go. We can simply inject documentation in the original compat rules and this PR is fine without additional upstream adjustments. 👏

documentation: {
url: 'https://foo.bar'
}
}
}
]
Expand Down
Loading