Skip to content

Commit

Permalink
refactor: Update messages
Browse files Browse the repository at this point in the history
  • Loading branch information
d3xter666 committed May 27, 2024
1 parent 5ca4458 commit 9925077
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
11 changes: 5 additions & 6 deletions src/linter/linterReporting.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
export const MESSAGES = {
SHORT__NO_DIRECT_DATATYPE_ACCESS: "Deprecated access to DataType ('{0}')",
DETAILS__NO_DIRECT_DATATYPE_ACCESS: "DataType can be accessed only via the static " +
"DataType.getType(\"{0}\") method. " +
"{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Deprecated Pseudo Modules}",
SHORT__NO_DIRECT_DATATYPE_ACCESS: "Deprecated access to DataType pseudo module '{0}'",
DETAILS__NO_DIRECT_DATATYPE_ACCESS:
"{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}",

SHORT__DEPRECATED_ACCESS_ENUM: "Deprecated access to enum pseudo module '{0}'",
DETAILS__DEPRECATED_ACCESS_ENUM:
"{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Deprecated Pseudo Modules}",
"{@link topic:00737d6c1b864dc3ab72ef56611491c4 Migrating Access to Pseudo Modules}",

SHORT__DEPRECATED_PROP_OF_CLASS: "Use of deprecated property '{0}' of class '{1}'",

Expand All @@ -25,7 +24,7 @@ export const MESSAGES = {
};

// TODO: Migrate to enum instead of Object/Map
// Currently, it's done this way to avoid polution of the test snapshots
// Currently, it's done this way to avoid pollution of the test snapshots
export const RULES = {
"ui5-linter-no-deprecated-api": "ui5-linter-no-deprecated-api",
"ui5-linter-no-partially-deprecated-api": "ui5-linter-no-partially-deprecated-api",
Expand Down
8 changes: 4 additions & 4 deletions test/lib/linter/rules/snapshots/NoPseudoModules.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Generated by [AVA](https://avajs.dev).
fatal: undefined,
line: 2,
message: 'Deprecated access to enum pseudo module \'sap/ui/core/BarColor\'',
messageDetails: 'Migrating Deprecated Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
ruleId: 'ui5-linter-no-pseudo-modules',
severity: 2,
},
Expand All @@ -29,16 +29,16 @@ Generated by [AVA](https://avajs.dev).
fatal: undefined,
line: 3,
message: 'Deprecated access to enum pseudo module \'sap/m/ListSeparators\'',
messageDetails: 'Migrating Deprecated Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
ruleId: 'ui5-linter-no-pseudo-modules',
severity: 2,
},
{
column: 2,
fatal: undefined,
line: 4,
message: 'Deprecated access to DataType (\'sap/ui/core/CSSSize\')',
messageDetails: 'DataType can be accessed only via the static DataType.getType("sap.ui.core.CSSSize") method. Migrating Deprecated Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
message: 'Deprecated access to DataType pseudo module \'sap/ui/core/CSSSize\'',
messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
ruleId: 'ui5-linter-no-pseudo-modules',
severity: 2,
},
Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoPseudoModules.ts.snap
Binary file not shown.
4 changes: 2 additions & 2 deletions test/lib/linter/snapshots/linter.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Generated by [AVA](https://avajs.dev).
fatal: undefined,
line: 1,
message: 'Deprecated access to enum pseudo module \'sap/m/BackgroundDesign\'',
messageDetails: 'Migrating Deprecated Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
ruleId: 'ui5-linter-no-pseudo-modules',
severity: 2,
},
Expand Down Expand Up @@ -782,7 +782,7 @@ Generated by [AVA](https://avajs.dev).
fatal: undefined,
line: 1,
message: 'Deprecated access to enum pseudo module \'sap/m/BackgroundDesign\'',
messageDetails: 'Migrating Deprecated Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
messageDetails: 'Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4)',
ruleId: 'ui5-linter-no-pseudo-modules',
severity: 2,
},
Expand Down
Binary file modified test/lib/linter/snapshots/linter.ts.snap
Binary file not shown.

0 comments on commit 9925077

Please sign in to comment.