SAPLint
Analyze ABAP and CDS source code for issues using local rules. Auto-select cloud or on-prem rules, fix problems, and format code.
Instructions
Run local abaplint rules on ABAP and CDS source code. System-aware: auto-selects cloud or on-prem rules based on detected system type.
Actions:
"lint": Check source for issues. Returns errors and warnings. Works for ABAP (PROG, CLAS, INTF, FUNC) and CDS views (DDLS) — catches syntax errors, naming conventions, field order, legacy view patterns.
"lint_and_fix": Lint + auto-fix all fixable issues (keyword case, obsolete statements, etc.). Returns fixed source.
"list_rules": List all available rules with current config. No source needed.
"format": Pretty-print ABAP source via SAP's ADT formatter (uses the SAP system's global formatter settings). Requires source. Returns the formatted source.
"get_formatter_settings": Read the SAP system's global PrettyPrinter settings (indentation, keyword style). No params.
"set_formatter_settings": Update the SAP system's global PrettyPrinter settings. Requires indentation (bool) and/or style (keywordUpper|keywordLower|keywordAuto|none). Blocked in read-only mode.
For server-side checks (ATC, syntax check, unit tests), use SAPDiagnose instead. Note: lint/lint_and_fix/list_rules run locally; format/*_formatter_settings call the SAP system.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Check type | |
| source | No | ABAP or CDS source code to lint/format (not needed for list_rules/get_formatter_settings) | |
| name | No | Object name (used for filename detection) | |
| indentation | No | PrettyPrinter: indent source (for set_formatter_settings) | |
| style | No | PrettyPrinter: keyword casing (for set_formatter_settings) | |
| rules | No | Rule overrides: { "rule_name": false } to disable, { "rule_name": { "severity": "Warning" } } to configure. Overrides system defaults. |