diff --git a/AGENTS.md b/AGENTS.md index f556eff..6230839 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -174,7 +174,7 @@ carries the `SMPS` token and is the only rule `check-app-rules` excludes from the comparison. It sits last in the file behind a marker that says so; everything above that marker must match the source. -All 188 rules abaplint ships are named: 171 on, 17 off, each with its reason +All 201 rules abaplint ships are named: 180 on, 21 off, each with its reason in a comment. **A rule is never left out of the file** — when an upgrade adds one, add the key to `app-rules.json` and copy the block into all three consumers: on if all three corpora pass, off with the reason if they do not. @@ -204,6 +204,10 @@ everybody. Each pattern matches nothing under the other two `src/` trees: shape. - `check_syntax` / `superclass_final` exclude `Z2UI5_CL_SMPS_APP_489`: ABAP Push Channels are on-premise only and absent from the steampunk dependency. +- `use_message_class` excludes `Z2UI5_CL_SMPS_APP_489_WS`, the push channel's + handler: it ends a failed request with `MESSAGE TYPE 'X'`, a + short dump naming the exception, because `RAISE SHORTDUMP` needs 7.53 and + this package runs from 7.50. - `cds_naming` takes the `Z2UI5_` namespace instead of SAP's per-category `ZI_` / `ZC_` / `ZR_` prefixes — the root view entities here are `Z2UI5_R_SMPS_`. diff --git a/abaplint.jsonc b/abaplint.jsonc index d324648..476a070 100644 --- a/abaplint.jsonc +++ b/abaplint.jsonc @@ -57,7 +57,7 @@ // thing above the line that may differ. Everything else - what is checked, // what is not, and why - is a joint decision of the three corpora. // - // Every rule abaplint ships is listed: all 188. 171 are on, 17 are off and + // Every rule abaplint ships is listed: all 201. 180 are on, 21 are off and // each says why. A rule is NEVER left out of the file. When an abaplint // upgrade adds one, add the key: on if all three corpora pass, off with the // reason if they do not. An unlisted rule reads as "nobody decided" rather @@ -123,6 +123,28 @@ // parent MIME folder lives on the system, not in the repository, so the // rule cannot resolve it from the sources alone. "smim_consistency": false, + // --- off: measured against the three corpora, and not met --------- + // Listed with abaplint 2.120.73 (2026-10-11), counts as samples / + // samples-controls / samples-stack. + // "|{ a }{ b }|" instead of "a && b": 161 / 1,635 / 15 findings. A style + // rewrite of 1,811 lines, most of them view texts in ports - a change of + // its own, not a rule switched on underneath it. + "prefer_string_template": false, + // INSERT ... INTO TABLE instead of APPEND: 12 / 64 / 16 findings. The + // same trade - a mechanical rewrite of 92 statements for a style rule. + "prefer_insert_into_table": false, + // Every dynamic construct is a finding: 17 / 8 / 21, and they are the + // point rather than an accident. Each overview app starts the chosen + // sample with CREATE OBJECT TYPE (name), app 104 is about instantiating + // another app over RTTI, the lock samples call the generated ENQUEUE_ + // module by name, the LLM factory and app 074 reach a class that only + // some releases have, and sorting or filtering a table by the column + // the user clicked is a dynamic ASSIGN / SORT BY (name). + "no_dynamic_stuff": false, + // Reports each match of the patterns it is configured with. The shared + // set has no pattern to enforce, and on with an empty list checks + // nothing - "on" would claim a check that does not exist. + "generic_regex": false, // --- on, with settings -------------------------------------------- // Hard ABAP limit, not a convention: a longer line breaks the abapGit // import with "Literals across more than one line are not allowed". @@ -280,6 +302,18 @@ "z2ui5_cl_smpc_demo_\\d+\\.clas\\." ] }, + // A MESSAGE with inline text has no screen to land on in an abap2UI5 + // app - the client's message_box / message_toast are how a sample says + // something. The one exclude is samples-stack's APC handler + // (z2ui5_cl_smps_app_489_ws): it ends a failed request with + // MESSAGE TYPE 'X', a short dump naming the exception, + // because RAISE SHORTDUMP only exists from 7.53 and that package runs + // from 7.50 - the class says so where it does it. + "use_message_class": { + "exclude": [ + "z2ui5_cl_smps_app_489_ws\\.clas\\." + ] + }, // --- on, scoped to what the RAP corpus can comply with ------------- // Excluded for samples-stack: CDS entities, actions and fields are // CamelCase by definition (Ticket, TravelUuid, Activate) and the rule @@ -400,6 +434,7 @@ "call_transaction_authority_check": true, "catch_and_raise": true, "cds_association_name": true, + "cds_check_syntax": true, "cds_comment_style": true, "cds_field_order": true, "cds_legacy_view": true, @@ -427,6 +462,7 @@ "downport": true, "dynpro_checks": true, "easy_to_find_messages": true, + "else_after_all_returns": true, "empty_event": true, "empty_statement": true, "exit_or_check": true, @@ -485,6 +521,8 @@ "parser_error": true, "parser_missing_space": true, "pragma_style": true, + "prefer_abap_bool": true, + "prefer_abap_bool_values": true, "prefer_is_not": true, "prefer_pragmas": true, // Excluded for samples-stack package 06, which ships at 7.40 SP08 (see @@ -498,6 +536,7 @@ "prefer_returning_to_exporting": true, "prefer_xsdbool": true, "preferred_compare_operator": true, + "preferred_parameter_ignored": true, "prefix_is_current_class": true, "reduce_procedural_code": true, "reduce_string_templates": true, @@ -529,6 +568,7 @@ "uncaught_exception": true, "unknown_types": true, "unnecessary_chaining": true, + "unnecessary_loop_guard": true, "unnecessary_pragma": true, "unnecessary_return": true, "unreachable_code": true, @@ -541,6 +581,8 @@ "use_new": true, "when_others_last": true, "whitespace_end": true, + "wrong_abapdoc_position": true, + "xml_bom": true, "xml_consistency": true, // =================================================================== // THE ONE PER-REPOSITORY RULE - everything above this line is identical diff --git a/scripts/check-app-rules.mjs b/scripts/check-app-rules.mjs index 03c7b0e..f8d0961 100644 --- a/scripts/check-app-rules.mjs +++ b/scripts/check-app-rules.mjs @@ -3,7 +3,7 @@ * check-app-rules — this repository's abaplint rules match the shared set. * * The shared set is `abap2UI5/abap2UI5`'s `.github/abaplint/app-rules.json`: - * 187 rules, everything except `object_naming`, which every repository sets + * 200 rules, everything except `object_naming`, which every repository sets * for its own object prefixes. abap2UI5 is the SOURCE — it is where the rest * of "how to write an abap2UI5 app" already lives (the build-an-app and * view-chain-layout skills, docs/agents/building-apps.md, abap-check, diff --git a/src/00/00/z2ui5_cl_smps_context.clas.abap b/src/00/00/z2ui5_cl_smps_context.clas.abap index be71228..b8ae903 100644 --- a/src/00/00/z2ui5_cl_smps_context.clas.abap +++ b/src/00/00/z2ui5_cl_smps_context.clas.abap @@ -546,9 +546,8 @@ CLASS z2ui5_cl_smps_context IMPLEMENTATION. lt_tab = msg_get_internal( ). INSERT LINES OF lt_tab INTO TABLE result. RETURN. - ELSE. - ls_result = msg_map( name = ls_attri->name val = is_msg = ls_result ). ENDIF. + ls_result = msg_map( name = ls_attri->name val = is_msg = ls_result ). ENDLOOP. IF ls_result-text IS INITIAL AND ls_result-id IS NOT INITIAL.