-
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: Add detection for deprecated dependencies in .library #104
feat: Add detection for deprecated dependencies in .library #104
Conversation
759be35
to
0cd78fa
Compare
JIRA: CPOUI5FOUNDATION-825 The `.library` detection is addressed in the following PR: #104
a7b646e
to
ce5dd32
Compare
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.
LGTM, but we worked in pair on that, so someone else needs to take a look, too
When limiting the linting to just the
|
When there is an empty node
|
The library name node is looked up everywhere in the XML document, not just within the expected structure. Could you check how much effort it would be to really check for the right place of the dependency name in the document? <?xml version="1.0" encoding="UTF-8" ?>
<library xmlns="http://www.sap.com/sap.ui.library.xsd" >
<dependencies>
<dependency>
<libraryName>sap.ui.commons</libraryName>
</dependency>
</dependencies>
</library>
As this is not expected to cause any issues, I'm fine with the current state in case this is a high effort to implement. |
Fixed with a876b14 |
Fixed |
We've managed to handle this one with 12bfaec |
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.
LGTM. The mentioned issue have been addressed. Just some minor remarks.
const resource = await workspace.byPath(resourcePath); | ||
if (!resource) { | ||
throw new Error(`Resource not found: ${resourcePath}`); | ||
} | ||
dotLibraryResources.push(resource); |
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.
This is not covered by the tests
this.#context.addLintingMessage(this.#resourcePath, { | ||
severity: LintMessageSeverity.Error, | ||
message, | ||
ruleId: RULES["ui5-linter-parsing-error"], | ||
fatal: true, | ||
}); |
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.
Not covered by unit tests
🚜 New release prepared --- ## [0.3.1](v0.3.0...v0.3.1) (2024-07-30) ### Features * Add detection for deprecated dependencies in .library ([#104](#104)) ([161f157](161f157)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
JIRA: CPOUI5FOUNDATION-825
+refactor: Add common
xmlParser
+refactor: Remove
htmlParser
The
Lib.init()
call detection is addressed in the following PR: #197