Skip to content

Repository files navigation

abap2UI5 linter

Validate abap2UI5 app classes without an SAP system — a CLI, library and GitHub Action extracted from the CI gates of samples-controls, where they guard its generated ports of the official UI5 demo kit samples (how many is in that repository's STATUS.md — it grows weekly, and a number written down here is a number that goes stale).

It checks a whole app class, not just the XML it emits: the ABAP source and the view it builds are validated together. The defects that matter most are the ones living between the two — a bound attribute whose ABAP field does not exist, an event argument the control never delivers — and no UI5 tooling can see them, because the view only exists at runtime.

npx @abap2ui5/linter src

That is the whole of it: no install, no SAP system, no configuration. ~340 kB and no dependencies, so the line above is a fast one.

src/zcl_my_app.clas.abap
  36:14  error  sap.m.Page has no aggregation contentt - typo?                       unknown-aggregation
  40:22  error  sap.m.Button type="Emphasised" is not a valid value (allowed: ...)   invalid-property-value

Then, when you want it to stay green:

npm install -D @abap2ui5/linter          # pin it for CI and for your machine
npx abap2ui5lint --init                  # write a commented abap2ui5lint.jsonc

Documentation

The linter, in full — the two gates and what each one catches, --screenshot, --fix, waivers, the baseline for adopting it on a codebase that already exists, the config file, the GitHub Action, the badges and the library API.

Rule reference — every rule id with the paragraph explaining what it means and why it exists. The id printed at the end of a finding is the anchor.

Two more entry points, for the two other ways in:

Adding the render gate npm i -D @abap2ui5/render-runtime + npx playwright install chromium — the headless XMLView.create that catches a view which fails to load
Starting a project app-template ships the CLI, the config and the workflow already wired up

Where it runs

The CLI, a GitHub Action (abap2UI5/linter@v0), and a library — plus two consumers of that library: mcp-server exposes these gates as MCP tools for AI coding agents, and the VS Code extension surfaces the findings as editor diagnostics while you type. All of them read the same abap2ui5lint.jsonc, so the editor, the agent and CI agree.

Used by

9 public repositories declare @abap2ui5/linter in a manifest — GitHub's own list, refreshed here monthly:

Only a manifest entry is counted here — that is what GitHub's dependency graph can see. A repository that runs the linter through npx --yes or the Action is a user, but never appears in this list.

Working on this repository

npm ci
npx playwright install chromium   # the render runtime is an npm workspace here
node cli.mjs src                  # the CLI, from the checkout
npm test

AGENTS.md carries the conventions and what every gate checks; CONTRIBUTING.md and RELEASING.md the rest of the workflow.

Three artefacts are generated and gated by npm test, so a stale one fails the build:

npm run generate-metadata    # data/properties.json, from the @openui5 sources
npm run generate-schema      # data/abap2ui5lint.schema.json — editor completion
npm run generate-rules-page  # site/index.html — the published rule reference

Two further generators need network, so the suite cannot regenerate them and the committed file is the contract instead; a scheduled workflow refreshes each one and opens a PR with the diff:

npm run generate-icons       # data/icons.json — the SAP icon-font snapshot
npm run generate-dependents  # the "Used by" list above, from GitHub's dependents page

site/ holds that generated rule reference (published to https://abap2ui5.github.io/linter/), not documentation about this repository.

experimental/github-app/ is a spike — a working prototype of the linter as a hosted GitHub App, kept as documentation that happens to execute. It is not deployed, not registered, not shipped on npm and not supported. The delivered channels are the CLI, the library and the Action.

Credits

The reconstruction, mock-model derivation, render harness and property gate were built and battle-tested in samples-controls against the official UI5 demo kit corpus — where scripts/view-gates.mjs now consumes this package as the extraction of those original gates. This package is the corpus-independent extraction.

Releases

Packages

Used by

Contributors

Languages