Skip to content

Detect and autofix the usage of id property on the root level node in a XMLView #1025

@flovogt

Description

@flovogt

I define a sap/ui/core/mvc/XMLView and specify the id property on the root level node. This property is not supported in the root level node and has no influence.

<mvc:View
  id="myFanyView"
  xmlns:mvc="sap.ui.core.mvc"
  xmlns="sap.m"
  controllerName="ui5app.controller.Home">
    <Text text="Hello"/>
<mvc:View>

Detection Goal

This scenario is detected and a finding is reported to remove the useless id property.

Autofix Goal

The id property is removed from the view definition.

<mvc:View
  xmlns:mvc="sap.ui.core.mvc"
  xmlns="sap.m"
  controllerName="ui5app.controller.Home">
    <Text text="Hello"/>
<mvc:View>

Metadata

Metadata

Assignees

No one assigned

    Labels

    autofixAn issue related to the autofix capabilitiesdetectionAn issue related to detection capabilities

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions