-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: Detect inline XML fragments & views (reuse TS program) #519
base: main
Are you sure you want to change the base?
Conversation
5205e53
to
ae136f2
Compare
a196c8b
to
480249c
Compare
Note: This change sorts messages in the tests, so that many unrelated test snapshots are also included in here. |
Currently, the linting results are deterministic and we should stick with that. Only sorting the results when comparing within unit tests will not lead to deterministic results for public consumers. I suspect that this is caused by a missing sorting of the newly created files. For the initial files, this is done via: ui5-linter/src/linter/ui5Types/TypeLinter.ts Lines 87 to 88 in 70ad529
|
|
||
const oView2 = sap.ui.view({ | ||
type: "XML", | ||
viewContent: `<mvc:View |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also include a test case where a normal string literal is used within one line. I could reproduce a wrong column information when using this:
viewContent: '<mvc:View controllerName="ui5app.controller.Home" displayBlock="true" xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core"><Button tap=".sayHello"></mvc:View>'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me the column info seems wrong. It is 146 but should be 162, isn't it?
JIRA: CPOUI5FOUNDATION-986
This is alternative implementation of #517 by reusing
program
instead of TS transpiling file by file.Note: This change's base is currently #518 as it paves the ground for dynamic addition of resources to the TS program