Skip to content

Name all 201 abaplint rules in the app rule set - #94

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/beautiful-turing-wxr303-abaplint
Oct 11, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/beautiful-turing-wxr303-abaplint

Conversation

@oblomov-dev

@oblomov-dev oblomov-dev commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Copies the shared rule block from abap2UI5/abap2UI5#2889 (.github/abaplint/app-rules.json). It decides the 13 rules abaplint 2.120.73 ships that the block did not name yet. Counts below are samples / samples-controls / samples-stack.

On (0 findings in all three after the fix below): cds_check_syntax, else_after_all_returns, prefer_abap_bool, prefer_abap_bool_values, preferred_parameter_ignored, unnecessary_loop_guard, wrong_abapdoc_position, xml_bom.

On, with one exclude: use_message_class. All 3 findings are in z2ui5_cl_smps_app_489_ws, the push channel handler. It ends a failed request with MESSAGE <exception> TYPE 'X', which dumps with the exception's text, because RAISE SHORTDUMP only exists from 7.53 and the package runs from 7.50. The class explains this where it does it. That is a deliberate construct, not a free-text message, so the file is excluded and the rule stays on for everything else. A MESSAGE with inline text in an abap2UI5 app has no screen to show on, so the rule is worth having. The exclude is also documented in AGENTS.md's list of scoped excludes.

Off, with the reason above each in abaplint.jsonc:

  • prefer_string_template: 161 / 1,635 / 15
  • prefer_insert_into_table: 12 / 64 / 16
  • no_dynamic_stuff: 17 / 8 / 21. Here those are the RTTI message reader in the context class, ENQUEUE_ by name in the lock samples, the LLM factory and the overview app.
  • generic_regex: no patterns configured, so on would check nothing.

Code fix

else_after_all_returns had 1 finding, in src/00/00/z2ui5_cl_smps_context.clas.abap: the RAP message reader returned from the ITEM branch and mapped the field in an ELSE. The mapping now follows the ENDIF, the same shape abap2UI5's own z2ui5_cl_ui5_util_context has. Behaviour is unchanged.

The block now names all 201 rules: 180 on, 21 off. The counts are updated in the block header and in AGENTS.md. The header of scripts/check-app-rules.mjs (byte-equal with abap2UI5's source) now says 200 rules.

Merge order: these five PRs belong together

Merge them together, one right after the other. check-app-rules here reads abap2UI5's main from GitHub, and abap2UI5's check:shared reads this repository's main. Until all of them are merged, those checks are red. On this PR in particular, check-app-rules stays red until #2889 is on abap2UI5's main.

Verified locally

  • npm run check passes, including abaplint: 0 issues, 190 files. abap2ui5lint has 0 failing, and with #2889 checked out as the sibling, check:app-rules reports "200 rule(s) here, 200 in the shared set - OK".
  • In abap2UI5, npm run check:shared against all three sample branches as siblings: OK.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt

Copies the shared block from abap2UI5's .github/abaplint/app-rules.json,
which now decides the thirteen rules abaplint 2.120.73 ships beyond the
188 the block named:

- on: cds_check_syntax, else_after_all_returns, prefer_abap_bool,
  prefer_abap_bool_values, preferred_parameter_ignored,
  unnecessary_loop_guard, wrong_abapdoc_position, xml_bom
- on with one exclude: use_message_class - the push channel handler
  z2ui5_cl_smps_app_489_ws ends a failed request with
  MESSAGE <exception> TYPE 'X' on purpose (RAISE SHORTDUMP needs 7.53)
- off, with the reason above each: prefer_string_template,
  prefer_insert_into_table, no_dynamic_stuff, generic_regex

else_after_all_returns had one finding here: the RAP message reader in
z2ui5_cl_smps_context returned from the ITEM branch and mapped the field
in an ELSE. The mapping now follows the ENDIF, the shape abap2UI5's own
z2ui5_cl_ui5_util_context has - same behaviour.

Lands together with the abap2UI5 app-rules pull request and the other
two sample repositories' - check-app-rules compares against abap2UI5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants