Ccodemod

codemod/abap-method-name-convention-miner

Rewrite ABAP method identifiers to lower snake case across declarations, implementations, and common call sites.

abapmethodsnamingsnake-casetransformation
Public
0 executions

Run locally

npx codemod @codemod/abap-method-name-convention-miner

@codemod/abap-method-name-convention-miner

Rewrite ABAP method identifiers to lower snake case across declarations, implementations, and common call sites.

Installation

bash

Usage

This codemod targets ABAP source files matching **/*.abap and rewrites method names like:

abap

into:

abap

Preserve behavior:

  • Rewrites METHODS, CLASS-METHODS, and METHOD declarations.
  • Rewrites direct calls like fooBar( ), selector calls like me->fooBar( ) and cl_type=>fooBar( ), and CALL METHOD fooBar.
  • Leaves comments, string literals, and already snake_case method names unchanged.
  • Skips renames that would collide with an already-present snake_case method name.

Implementation note:

  • ABAP is not a parser-backed JSSG language here, so the transform uses a source-text rewrite scoped to method declarations and common invocation forms.

Development

bash

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.