Skip to content

Commit d3d17c6

Browse files
committed
refactor: Add ui5TypeInfo to LintMessage
This provides external tools with detailed type information for each finding
1 parent 9f4c240 commit d3d17c6

32 files changed

+5675
-0
lines changed

src/linter/LinterContext.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export interface LintMessage {
4040
severity: LintMessageSeverity;
4141
message: string;
4242
messageDetails?: string;
43+
ui5TypeInfo?: Ui5TypeInfo;
4344
fatal?: boolean | undefined; // e.g. parsing error
4445
line?: number | undefined; // 1 based to be aligned with most IDEs
4546
column?: number | undefined; // 1 based to be aligned with most IDEs
@@ -238,6 +239,7 @@ export default class LinterContext {
238239
line: rawMessage.position ? rawMessage.position.line : undefined,
239240
column: rawMessage.position ? rawMessage.position.column : undefined,
240241
message: messageFunc(rawMessage.args || {}),
242+
ui5TypeInfo: rawMessage.ui5TypeInfo,
241243
};
242244

243245
if (this.#includeMessageDetails) {

test/lib/autofix/autofix.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ test("autofix (JS): Parsing error after applying fixes", async (t) => {
119119
line: 1,
120120
column: 1,
121121
}),
122+
ui5TypeInfo: undefined,
122123
},
123124
],
124125
});
@@ -149,6 +150,7 @@ test("autofix (JS): Parsing error after applying fixes", async (t) => {
149150
`https://github.com/UI5/linter/issues/new?template=bug-report.md`,
150151
ruleId: "autofix-error",
151152
severity: 1,
153+
ui5TypeInfo: undefined,
152154
},
153155
],
154156
},
@@ -178,6 +180,7 @@ test("autofix (XML): Parsing error after applying fixes", async (t) => {
178180
line: 1,
179181
column: 11,
180182
}),
183+
ui5TypeInfo: undefined,
181184
},
182185
],
183186
});
@@ -207,6 +210,7 @@ test("autofix (XML): Parsing error after applying fixes", async (t) => {
207210
`https://github.com/UI5/linter/issues/new?template=bug-report.md`,
208211
ruleId: "autofix-error",
209212
severity: 1,
213+
ui5TypeInfo: undefined,
210214
},
211215
],
212216
},

0 commit comments

Comments
 (0)