generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
detectionAn issue related to detection capabilitiesAn issue related to detection capabilities
Description
Expected Behavior
Detect that renderer has no apiVersion set. Renderer has to use apiVersion >=2.
Current Behavior
ButtonRenderer.js:
sap.ui.define([
"sap/ui/core/Renderer",
"./BaseRenderer"
], (Renderer, BaseRenderer) => {
"use strict";
const ButtonRenderer = Renderer.extend(BaseRenderer);
// The following line is required to be set to 2, UI5 linter should detect this and suggest to set it to 2,
// otherwise the render method is not compliant with UI5 legacy-free
// ButtonRenderer.apiVersion = 2;
ButtonRenderer.render = (oRenderManager, oContainer) => {
if (!oContainer.getReadyForRendering()) {
BaseRenderer.render(oRenderManager, oContainer);
return;
}
}
return ButtonRenderer;
});BaseRenderer.js:
sap.ui.define([], () => {
"use strict";
const BaseRenderer = {};
BaseRenderer.apiVersion = 2;
BaseRenderer.render = function () {
};
return BaseRenderer;
});Steps to Reproduce the Issue
- Download following files:
- Run "ui5lint"
- No findings are reported
Context
- UI5 linter version:
1.20.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
detectionAn issue related to detection capabilitiesAn issue related to detection capabilities