UI5 / UI5/linter

Detect missing library dependency in manifest.json based on controls used in XML views/fragments

Open
#244 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

detection
Dominant language
TypeScript
Stars
79
Forks
13
Avg merge
19h 34m
Merged PRs (30d)
9

Description

I have an sap/ui/core/mvc/XMLView or an in XML defined sap/ui/core/Fragment. I am using a control e.g. sap/m/Text but I have forgotten to add the sap.m library to the sap.ui5/dependencies/lib array in the manifest.json.

View

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

manifest.json

"sap.ui5": {
  "dependencies": {
      "minUI5Version": "1.121.0",
      "libs": {
        "sap.ui.core": {}
      }
}

Goal

This scenario is detected and an finding is reported to add the missing library dependency to the manifest.json.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the supplied XML view or fragment and manifest.json examples, then trace where the linter reads used controls and declared libraries. Run the relevant linter checks and verify that using sap/m/Text without sap.m produces a finding requesting the missing manifest dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.