SAPLint
Run local abaplint rules to check and auto-fix ABAP/CDS source code, or format via SAP's ADT PrettyPrinter.
Instructions
Run local abaplint rules on ABAP/CDS source (auto-selects cloud or on-prem rules by system type). Actions:
"lint": check source (errors+warnings) for ABAP (PROG/CLAS/INTF/FUNC) and CDS (DDLS).
"lint_and_fix": lint + auto-fix fixable issues (keyword case, obsolete statements); returns fixed source.
"list_rules": list rules + current config (no source).
"format": pretty-print via SAP's ADT formatter (needs source).
"get_formatter_settings" / "set_formatter_settings": read/update the system's global PrettyPrinter (indentation bool, style keywordUpper|keywordLower|keywordAuto|none; set is blocked read-only). lint/lint_and_fix/list_rules run locally; format/*_formatter_settings call SAP. For ATC/syntax/unit tests use SAPDiagnose.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Object name (used for filename detection) | |
| rules | No | Rule overrides: { "rule_name": false } to disable, { "rule_name": { "severity": "Warning" } } to configure. Overrides system defaults. | |
| style | No | PrettyPrinter: keyword casing (for set_formatter_settings) | |
| action | Yes | Check type | |
| source | No | ABAP or CDS source code to lint/format (not needed for list_rules/get_formatter_settings) | |
| indentation | No | PrettyPrinter: indent source (for set_formatter_settings) |