Lint ABAP source
lint_abapRun abaplint static analysis on ABAP, CDS, or behavior-definition code to catch style and correctness issues offline before the code reaches SAP.
Instructions
Run abaplint static analysis over ABAP, CDS or behavior-definition sources and return structured findings (rule key, message, severity, file/line/column, the offending line, and a docs URL per finding). Use this when you have written or modified ABAP code and want style and correctness feedback before it goes anywhere near a system — it runs entirely offline on the provided text. It does not connect to any SAP system, does not run ATC, and cannot judge whether referenced objects exist unless you provide them in the same call (preset "style", the default, skips whole-program checks for that reason; preset "full" enables them when you provide every dependency). A focus tag turns a pass into a themed review (performance / security / Clean ABAP style) without hand-picking rules; rule overrides layer a team's own pack on top. For an ABAP-Cloud migration verdict use check_cloud_readiness instead. When the call contains a .bdef.asbdef or .srvd.srvdsrv file, abap-mcp's own RAP checker also runs over the whole set and its findings are merged in under rap/ rule keys (abaplint does not deep-parse those file types, so without this they would silently produce nothing); set rapCheck:false to opt out, or call check_rap_behavior for the full structured RAP report with hints, confidence and the scope note. Example: lint_abap({ "files": [ { "source": "REPORT ztest.\nDATA foo TYPE i.\nIF foo = 1.\nENDIF." } ] }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Source files to analyze, up to 32 per call, 100k chars each. | |
| focus | No | Curated rule-pack lens: report only rules carrying this abaplint tag — "Performance" for a tuning pass, "Security" for a security sweep, "Styleguide" for Clean ABAP adherence. Parser errors always surface. Ignored with preset "syntax-only". Combine with rules to re-tune individual rules in the pack. | |
| rules | No | abaplint rule overrides merged onto the preset (and onto a focus filter), e.g. { "line_length": { "length": 120 }, "7bit_ascii": false } — encode an org's best-practice pack here. | |
| preset | No | "style" (default): abaplint default rules minus whole-program semantic checks — right for isolated snippets. "full": every default rule, expects all referenced objects provided. "syntax-only": parser errors only. | style |
| rapCheck | No | Also run abap-mcp's own RAP behavior/service-definition checker when the call contains a .bdef.asbdef or .srvd.srvdsrv file, merging its findings under namespaced "rap/RAP026"-style rule keys. Default true — abaplint returns nothing at all for those file types. Set false for abaplint-only output (e.g. a CI that compares finding counts across versions). | |
| abapVersion | No | ABAP language version to parse against. "v758" (default) is current on-prem; "Cloud" is ABAP Cloud / Steampunk. | v758 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| findings | Yes | ||
| fileCount | Yes | Number of files analyzed. | |
| truncated | Yes | True if the list was cut short — more than 500 findings, or the RAP checker hit one of its own caps. | |
| rapChecked | Yes | True when the RAP checker ran (the call held a BDEF/SRVD and rapCheck was on); its findings carry rap/ rule keys. | |
| rapScopeNote | No | Present only when rapChecked is true: what the RAP checker proves and does not prove. |