Skip to content

Commit

Permalink
fix(html): Detect all missing bootstrap parameters
Browse files Browse the repository at this point in the history
All missing parameters should be reported at once.
  • Loading branch information
matz3 committed Oct 7, 2024
1 parent fe642c6 commit 6d51ec5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/linter/html/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ function lintBootstrapAttributes(tag: Tag, report: HtmlReporter) {
name: "data-sap-ui-async",
details: `{@link topic:91f2d03b6f4d1014b6dd926db0e91070 Configuration Options and URL Parameters}`,
}, tag);
} else if (!attributes.has("data-sap-ui-compat-version")) {
}
if (!attributes.has("data-sap-ui-compat-version")) {
report.addMessage(MESSAGE.MISSING_BOOTSTRAP_PARAM, {
name: "data-sap-ui-compat-version",
details: `{@link topic:9feb96da02c2429bb1afcf6534d77c79 Compatibility Version Information (deprecated)}`,
Expand Down
10 changes: 9 additions & 1 deletion test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Generated by [AVA](https://avajs.dev).
[
{
coverageInfo: [],
errorCount: 2,
errorCount: 3,
fatalErrorCount: 0,
filePath: 'BootstrapParameters_MultipleScripts2.html',
messages: [
Expand All @@ -194,6 +194,14 @@ Generated by [AVA](https://avajs.dev).
ruleId: 'no-deprecated-api',
severity: 2,
},
{
column: 2,
line: 13,
message: 'Missing bootstrap parameter \'data-sap-ui-compat-version\'',
messageDetails: 'Compatibility Version Information (deprecated) (https://ui5.sap.com/#/topic/9feb96da02c2429bb1afcf6534d77c79)',
ruleId: 'no-deprecated-api',
severity: 2,
},
],
warningCount: 0,
},
Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap
Binary file not shown.

0 comments on commit 6d51ec5

Please sign in to comment.