diff --git a/src/detectors/typeChecker/FileLinter.ts b/src/detectors/typeChecker/FileLinter.ts index ad812fc66..6aebe0d93 100644 --- a/src/detectors/typeChecker/FileLinter.ts +++ b/src/detectors/typeChecker/FileLinter.ts @@ -271,6 +271,7 @@ export default class FileLinter { ruleId: "ui5-linter-no-partially-deprecated-api", message: `Call to ${importedVarName}() must be declared with property {apiVersion: 2}`, + messageDetails: this.#messageDetails ? `{@link sap.ui.core.Lib.init Lib.init}` : undefined, }); } } diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md index 05c0f50a4..eee0a0b24 100644 --- a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md +++ b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md @@ -804,6 +804,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 9, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -812,6 +813,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 10, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -820,6 +822,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 11, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -828,6 +831,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 12, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -836,6 +840,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 16, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -844,6 +849,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 19, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -852,6 +858,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 22, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -860,6 +867,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 25, message: 'Call to Library.init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -868,6 +876,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 30, message: 'Call to LibInit() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -876,6 +885,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 35, message: 'Call to init() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, @@ -884,6 +894,7 @@ Generated by [AVA](https://avajs.dev). fatal: undefined, line: 40, message: 'Call to intRenames() must be declared with property {apiVersion: 2}', + messageDetails: 'Lib.init (https://ui5.sap.com/1.120/#/api/sap.ui.core.Lib)', ruleId: 'ui5-linter-no-partially-deprecated-api', severity: 2, }, diff --git a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap index c19ae6793..c5cc41434 100644 Binary files a/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap and b/test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap differ