@codemod/abap-no-commented-out-code
Remove full-line ABAP comments that look like commented-out source statements from *.abap files.
What It Rewrites
- Full-line
*comments whose bodies look like ABAP statements such as assignments, control-flow lines, declarations, and method orPERFORMcalls - Full-line
"comments with the same code-like patterns - Contiguous comment-only blocks when every non-separator comment line in the block looks like ABAP code
- Empty or separator comment lines inside a removable commented-out code block
Preserved Cases
- Prose comments such as release notes or explanations
- Trailing inline comments on active ABAP statements
- Mixed comment blocks that contain both prose and code-like lines
- Non-ABAP files
Heuristics
The codemod is intentionally conservative. It only removes comment blocks when every meaningful line in the block matches one of these code-like shapes:
- Standalone block terminators such as
ENDIF.orENDLOOP. - Assignments such as
lv_total = lines( lt_items ). - Method-style calls such as
lo_service->run( ). - Control statements such as
IF sy-subrc = 0. - Common ABAP statements such as
CLEAR lv_total.orSELECT ... .
If a comment block mixes prose with code-like lines, the whole block stays unchanged.
Usage
bash
Development
bash
License
MIT