9.1Bloom · UNot started

ABAP Cleaner & abaplint

Reading depth

What you'll learn

ABAP Cleaner auto-fixes ~70 Clean ABAP rules inside ADT; abaplint is an offline TypeScript linter that guards ABAP in git for CI and pre-commit.

  • ABAP Cleaner auto-fixes ~70 Clean ABAP rules inside ADT, with run-on-save and custom rules.
  • abaplint is a standalone TypeScript linter that runs on ABAP source in git — no SAP system needed.
  • abaplint suits offline CI and pre-commit hooks (husky / lefthook); configured by abaplint.json.

ABAP Cleaner and abaplint both push code toward Clean ABAP, but they live at different points in the workflow and that distinction is the whole point. ABAP Cleaner is an open-source plug-in that ships into ADT and auto-fixes roughly seventy Clean ABAP rules — inline declarations, constructor expressions, method-chaining cleanup, pragma-versus-pseudo-comment normalisation, whitespace and alignment, dead-section removal. It rewrites the source in place inside the editor, and you can turn on run-on-save so cleanup is friction-free; it is even fork-friendly, letting a shop author its own rules.

abaplint is a different beast: a standalone linter written in TypeScript that runs against ABAP source sitting in a git repository, with no SAP system in the loop. Because it is offline and fast, it slots into continuous integration and pre-commit hooks (via husky or lefthook), catching many of the same findings ATC would — plus style — before code ever gets near the SAP backend. It is configured by a checked-in `abaplint.json`, so the rules travel with the repo.

The senior takeaway is that the two are complementary, not rival. ABAP Cleaner fixes the developer's code automatically while they work inside ADT; abaplint guards the repository in CI where there is no ADT and no system. Using both means style is corrected at authoring time and enforced again at the gate, so neither personal discipline nor a forgotten run-on-save is the only line of defence.

Key points

  • ABAP Cleaner auto-fixes ~70 Clean ABAP rules inside ADT, with run-on-save and custom rules.
  • abaplint is a standalone TypeScript linter that runs on ABAP source in git — no SAP system needed.
  • abaplint suits offline CI and pre-commit hooks (husky / lefthook); configured by abaplint.json.
  • They are complementary: Cleaner fixes at authoring time, abaplint enforces at the gate.
  • Both push toward Clean ABAP, but only ABAP Cleaner rewrites the source for you.

Examples

Two tools, two moments

A developer hits save in ADT and ABAP Cleaner tidies the unit on the spot; later, the same code lands in a pull request where abaplint runs offline in CI and blocks the merge if a rule still fails.

Source notes: clean-core-curriculum §9.1

Ask Claude

Build a prompt from this lesson + your question and open a fresh Claude chat with it pre-filled — handy for adapting a before/after pattern to your own object.