Skip to content
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

Ignore a specific line in code like @ts-ignore #268

Open
marianfoo opened this issue Aug 23, 2024 · 1 comment
Open

Ignore a specific line in code like @ts-ignore #268

marianfoo opened this issue Aug 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@marianfoo
Copy link
Contributor

Is your feature request related to a problem? Please describe.

If you want to develop a application for cross main version support, you need to use deprecated APIs.
For example in this code sample to use MessageManager from Version 1.71 to 2.0 i still need to use the sap.ui.getCore():

try {
	// sap.ui.core.Messaging is only available in UI5 version 1.118 and above, prefer this over sap.ui.getCore().getMessageManager()saging = Util.loadUI5RessourceAsync("sap/ui/core/Messaging");
	const Messaging = await Util.loadUI5RessourceAsync("sap/ui/core/Messaging");
	Messaging.removeAllMessages();
	return;
} catch (error) {
	Log.debug("sap/ui/core/Messaging not found", undefined, "SpreadsheetUpload: checkForODataErrors");
}
// fallback for UI5 versions below 1.118
sap.ui.getCore().getMessageManager().removeAllMessages();

Describe the solution you'd like

When i would use the ui5 linter, this would be a error everytime the file is checked. So ignore file like in #170 does not help.
I would like to use something like a annotation similar to for example @ts-ignore
In this case i can run CI/CD pipelines explicity stating that this can be ignored.

Describe alternatives you've considered

Currently i don´t know how to workaround this.

@marianfoo marianfoo added the enhancement New feature or request label Aug 23, 2024
@flovogt flovogt self-assigned this Sep 4, 2024
@flovogt
Copy link
Member

flovogt commented Sep 23, 2024

Thanks a lot @marianfoo for this enhancement request. We will implement this feature in backlog item CPOUI5FOUNDATION-911.

@flovogt flovogt removed their assignment Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants