@abaplint/cli 2.83.24 → 2.84.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +21 -21
  2. package/abaplint +2 -2
  3. package/build/cli.js +100 -78
  4. package/package.json +64 -64
package/build/cli.js CHANGED
@@ -1171,7 +1171,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
1171
1171
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1172
1172
 
1173
1173
  "use strict";
1174
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./abstract_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abstract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./and_return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/and_return.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arrow_or_dash */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow_or_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arrow */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./block_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cast */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_final */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_friends.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./color */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/color.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./concatenated_constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/concatenated_constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/conv_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_connection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_connection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./decimals */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/decimals.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/default.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definition_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/definition_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dereference.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./destination */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/destination.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dynamic */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./event_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_handler.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exception_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/exception_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_all */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_all.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_assignment */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/filter_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./final_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/final_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./find_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/find_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./for */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/for.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_raising.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_using.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fstarget */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/fstarget.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/include_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_field_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_loop_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_loop_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inlinedata */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinedata.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inlinefs */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinefs.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./integer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/integer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/interface_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/language.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./let */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/let.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./macro_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/macro_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_class */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_type_and_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_type_and_number.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_importing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_importing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_raising.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param_optional */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_optional.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/modif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./namespace_simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/namespace_simple_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/new_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ole_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/ole_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./or */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/or.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_exception */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pass_by_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/pass_by_value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_using.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./radio_group_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise_with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/raise_with.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_table_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/read_table_target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./receive_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/receive_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./redefinition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/redefinition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_next */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./report_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/report_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_aggregation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_alias_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_arithmetics */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_as_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_client */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_field_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_for_all_entries */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_from_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_from */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_hints */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_into_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_path */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_formatting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./super_class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/super_class_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/switch_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table_expression */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_key.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./throw */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/throw.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_name_or_infer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name_or_infer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/with_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./write_offset_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/write_offset_length.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js?");
1174
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./abstract_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abstract */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./and_return */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/and_return.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arrow_or_dash */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow_or_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./arrow */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/arrow.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./block_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/block_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cast */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cast.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_final */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_friends */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_friends.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_global */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_global.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/class_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./color */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/color.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./concatenated_constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/concatenated_constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./conv_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/conv_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./corresponding_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./data_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_connection */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_connection.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./decimals */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/decimals.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./default */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/default.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definition_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/definition_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dereference */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dereference.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./destination */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/destination.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dynamic */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/dynamic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./event_handler */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/event_handler.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exception_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/exception_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_all */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_all.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_assignment */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_sub */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./filter_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/filter_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./final_methods */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/final_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./find_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/find_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./for */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/for.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param_type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_raising.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/form_using.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fstarget */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/fstarget.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting_parameter */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting_parameter.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./include_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/include_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_field_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_loop_definition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inline_loop_definition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inlinedata */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinedata.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inlinefs */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/inlinefs.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./integer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/integer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./interface_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/interface_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./language */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/language.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./let */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/let.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./loop_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/loop_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./macro_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/macro_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_class */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_type_and_number */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_type_and_number.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_importing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_importing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_raising */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_raising.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_def_returning */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_def_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param_optional */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param_optional.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modif */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/modif.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./namespace_simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/namespace_simple_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./new_object */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/new_object.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ole_exporting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/ole_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./or */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/or.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_exception */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_exceptions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pass_by_value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/pass_by_value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_changing */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_changing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_tables */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./perform_using */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/perform_using.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./radio_group_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/radio_group_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./raise_with */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/raise_with.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./read_table_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/read_table_target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./receive_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/receive_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./redefinition */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/redefinition.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_next */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/reduce_next.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./report_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/report_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_loop */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/select.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_field_chain */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_aggregation */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_aggregation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_alias_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_alias_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_arithmetics */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_as_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_case */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_client */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_compare_operator */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_compare */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_cond */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_field_list */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_list.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_field_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_for_all_entries */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_for_all_entries.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_from_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_from */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_from.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_function */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_group_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_group_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_having */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_having.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_hints */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_hints.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_into_structure */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_into_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_into_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_join */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_join.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_order_by */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_path */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source_simple */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_formatting */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_formatting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./super_class_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/super_class_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./switch_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/switch_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./table_expression */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target_field_symbol */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target_field */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target_field.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/target.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_key.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element_string */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element_string.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./text_element */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/text_element.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./throw */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/throw.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_name_or_infer */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name_or_infer.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_param */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_table_key */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_table */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./value_body */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./value */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./with_name */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/with_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./write_offset_length */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/write_offset_length.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js?");
1175
1175
 
1176
1176
  /***/ }),
1177
1177
 
@@ -1318,6 +1318,17 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
1318
1318
 
1319
1319
  /***/ }),
1320
1320
 
1321
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js":
1322
+ /*!***********************************************************************************************!*\
1323
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js ***!
1324
+ \***********************************************************************************************/
1325
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1326
+
1327
+ "use strict";
1328
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MessageNumber = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nclass MessageNumber extends combi_1.Expression {\r\n getRunnable() {\r\n return (0, combi_1.regex)(/^\\d\\d\\d$/i);\r\n }\r\n}\r\nexports.MessageNumber = MessageNumber;\r\n//# sourceMappingURL=message_number.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_number.js?");
1329
+
1330
+ /***/ }),
1331
+
1321
1332
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js":
1322
1333
  /*!***********************************************************************************************!*\
1323
1334
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js ***!
@@ -1325,7 +1336,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
1325
1336
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1326
1337
 
1327
1338
  "use strict";
1328
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MessageSource = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass MessageSource extends combi_1.Expression {\r\n getRunnable() {\r\n const msgid = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), _1.MessageClass, (0, combi_1.tok)(tokens_1.ParenRightW));\r\n const simple = (0, combi_1.seq)(_1.MessageTypeAndNumber, (0, combi_1.opt)(msgid));\r\n const mess1 = (0, combi_1.seq)(\"ID\", _1.Source, \"TYPE\", _1.Source, \"NUMBER\", _1.Source);\r\n return (0, combi_1.altPrio)(simple, mess1);\r\n }\r\n}\r\nexports.MessageSource = MessageSource;\r\n//# sourceMappingURL=message_source.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js?");
1339
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MessageSource = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass MessageSource extends combi_1.Expression {\r\n getRunnable() {\r\n const msgid = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeft), _1.MessageClass, (0, combi_1.tok)(tokens_1.ParenRightW));\r\n const simple = (0, combi_1.seq)(_1.MessageTypeAndNumber, (0, combi_1.opt)(msgid));\r\n const mess1 = (0, combi_1.seq)(\"ID\", _1.Source, \"TYPE\", _1.Source, \"NUMBER\", (0, combi_1.altPrio)(_1.MessageNumber, _1.Source));\r\n return (0, combi_1.altPrio)(simple, mess1);\r\n }\r\n}\r\nexports.MessageSource = MessageSource;\r\n//# sourceMappingURL=message_source.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/message_source.js?");
1329
1340
 
1330
1341
  /***/ }),
1331
1342
 
@@ -4691,7 +4702,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
4691
4702
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4692
4703
 
4693
4704
  "use strict";
4694
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Raise = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass Raise {\r\n getMatcher() {\r\n const mess = (0, combi_1.seq)(\"MESSAGE\", expressions_1.MessageSource, (0, combi_1.opt)(expressions_1.RaiseWith));\r\n const messid = (0, combi_1.seq)(\"MESSAGE ID\", expressions_1.Source, \"NUMBER\", expressions_1.Source, (0, combi_1.optPrio)(expressions_1.RaiseWith));\r\n const exporting = (0, combi_1.seq)(\"EXPORTING\", expressions_1.ParameterListS);\r\n const from = (0, combi_1.seq)(\"TYPE\", expressions_1.ClassName, (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.alt)(mess, messid)), (0, combi_1.ver)(version_1.Version.v752, \"USING MESSAGE\"))), (0, combi_1.optPrio)(exporting));\r\n const clas = (0, combi_1.seq)((0, combi_1.optPrio)(\"RESUMABLE\"), \"EXCEPTION\", (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source), expressions_1.SimpleSource2));\r\n const ret = (0, combi_1.seq)(\"RAISE\", (0, combi_1.altPrio)(clas, expressions_1.Field));\r\n return ret;\r\n }\r\n}\r\nexports.Raise = Raise;\r\n//# sourceMappingURL=raise.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise.js?");
4705
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Raise = void 0;\r\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass Raise {\r\n getMatcher() {\r\n const mess = (0, combi_1.seq)(\"MESSAGE\", expressions_1.MessageSource, (0, combi_1.opt)(expressions_1.RaiseWith));\r\n const messid = (0, combi_1.seq)(\"MESSAGE ID\", expressions_1.Source, \"NUMBER\", (0, combi_1.altPrio)(expressions_1.MessageNumber, expressions_1.Source), (0, combi_1.optPrio)(expressions_1.RaiseWith));\r\n const exporting = (0, combi_1.seq)(\"EXPORTING\", expressions_1.ParameterListS);\r\n const from = (0, combi_1.seq)(\"TYPE\", expressions_1.ClassName, (0, combi_1.opt)((0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v750, (0, combi_1.alt)(mess, messid)), (0, combi_1.ver)(version_1.Version.v752, \"USING MESSAGE\"))), (0, combi_1.optPrio)(exporting));\r\n const clas = (0, combi_1.seq)((0, combi_1.optPrio)(\"RESUMABLE\"), \"EXCEPTION\", (0, combi_1.altPrio)(from, (0, combi_1.ver)(version_1.Version.v752, expressions_1.Source), expressions_1.SimpleSource2));\r\n const ret = (0, combi_1.seq)(\"RAISE\", (0, combi_1.altPrio)(clas, expressions_1.Field));\r\n return ret;\r\n }\r\n}\r\nexports.Raise = Raise;\r\n//# sourceMappingURL=raise.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/raise.js?");
4695
4706
 
4696
4707
  /***/ }),
4697
4708
 
@@ -6627,7 +6638,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6627
6638
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6628
6639
 
6629
6640
  "use strict";
6630
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DatabaseTable = void 0;\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass DatabaseTable {\r\n runSyntax(node, scope, filename) {\r\n const token = node.getFirstToken();\r\n const name = token.getStr();\r\n if (name === \"(\") {\r\n // dynamic\r\n return;\r\n }\r\n const found = scope.getDDIC().lookupTableOrView2(name);\r\n if (found === undefined && scope.getDDIC().inErrorNamespace(name) === true) {\r\n throw new Error(\"Database table or view \\\"\" + name + \"\\\" not found\");\r\n }\r\n else if (found === undefined) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.TableVoidReference, filename);\r\n }\r\n else {\r\n scope.addReference(token, found.getIdentifier(), _reference_1.ReferenceType.TableReference, filename);\r\n }\r\n }\r\n}\r\nexports.DatabaseTable = DatabaseTable;\r\n//# sourceMappingURL=database_table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/database_table.js?");
6641
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DatabaseTable = void 0;\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass DatabaseTable {\r\n runSyntax(node, scope, filename) {\r\n const token = node.getFirstToken();\r\n const name = token.getStr();\r\n if (name === \"(\") {\r\n // dynamic\r\n return;\r\n }\r\n const found = scope.getDDIC().lookupTableOrView2(name);\r\n if (found === undefined && scope.getDDIC().inErrorNamespace(name) === true) {\r\n throw new Error(\"Database table or view \\\"\" + name + \"\\\" not found\");\r\n }\r\n else if (found === undefined) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.TableVoidReference, filename);\r\n }\r\n else {\r\n scope.addReference(token, found.getIdentifier(), _reference_1.ReferenceType.TableReference, filename);\r\n scope.getDDICReferences().addUsing(scope.getParentObj(), { object: found, token: token, filename: filename });\r\n }\r\n }\r\n}\r\nexports.DatabaseTable = DatabaseTable;\r\n//# sourceMappingURL=database_table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/database_table.js?");
6631
6642
 
6632
6643
  /***/ }),
6633
6644
 
@@ -8442,7 +8453,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8442
8453
  /***/ ((__unused_webpack_module, exports) => {
8443
8454
 
8444
8455
  "use strict";
8445
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FlowGraph = void 0;\r\nclass FlowGraph {\r\n constructor(counter) {\r\n this.label = \"undefined\";\r\n this.edges = {};\r\n this.start = \"start#\" + counter;\r\n this.end = \"end#\" + counter;\r\n }\r\n getStart() {\r\n return this.start;\r\n }\r\n getEnd() {\r\n return this.end;\r\n }\r\n addEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = {};\r\n }\r\n this.edges[from][to] = true;\r\n }\r\n removeEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n return;\r\n }\r\n delete this.edges[from][to];\r\n if (Object.keys(this.edges[from]).length === 0) {\r\n delete this.edges[from];\r\n }\r\n }\r\n listEdges() {\r\n const list = [];\r\n for (const from of Object.keys(this.edges)) {\r\n for (const to of Object.keys(this.edges[from])) {\r\n list.push({ from, to });\r\n }\r\n }\r\n return list;\r\n }\r\n listNodes() {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n set.add(l.from);\r\n set.add(l.to);\r\n }\r\n return Array.from(set.values());\r\n }\r\n hasEdges() {\r\n return Object.keys(this.edges).length > 0;\r\n }\r\n /** return value: end node of to graph */\r\n addGraph(from, to) {\r\n if (to.hasEdges() === false) {\r\n return from;\r\n }\r\n this.addEdge(from, to.getStart());\r\n to.listEdges().forEach(e => this.addEdge(e.from, e.to));\r\n return to.getEnd();\r\n }\r\n toJSON() {\r\n return JSON.stringify(this.edges);\r\n }\r\n toTextEdges() {\r\n let graph = \"\";\r\n for (const l of this.listEdges()) {\r\n graph += `\"${l.from}\" -> \"${l.to}\";\\n`;\r\n }\r\n return graph.trim();\r\n }\r\n setLabel(label) {\r\n this.label = label;\r\n }\r\n toDigraph() {\r\n return `digraph G {\nlabelloc=\"t\";\nlabel=\"${this.label}\";\ngraph [fontname = \"helvetica\"];\nnode [fontname = \"helvetica\", shape=\"box\"];\nedge [fontname = \"helvetica\"];\n${this.toTextEdges()}\n}`;\r\n }\r\n listSources(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.to) {\r\n set.add(l.from);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n listTargets(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.from) {\r\n set.add(l.to);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n /** removes all nodes containing \"#\" that have one ingoing and one outgoing edge */\r\n reduce() {\r\n for (const node of this.listNodes()) {\r\n if (node.includes(\"#\") === false) {\r\n continue;\r\n }\r\n const sources = this.listSources(node);\r\n const targets = this.listTargets(node);\r\n if (sources.length > 0 && targets.length > 0) {\r\n // hash node in the middle of the graph\r\n for (const s of sources) {\r\n this.removeEdge(s, node);\r\n }\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n for (const s of sources) {\r\n for (const t of targets) {\r\n this.addEdge(s, t);\r\n }\r\n }\r\n }\r\n if (node.startsWith(\"end#\") && sources.length === 0) {\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\nexports.FlowGraph = FlowGraph;\r\n//# sourceMappingURL=flow_graph.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js?");
8456
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FlowGraph = void 0;\r\nclass FlowGraph {\r\n constructor(counter) {\r\n this.label = \"undefined\";\r\n this.edges = {};\r\n this.start = \"start#\" + counter;\r\n this.end = \"end#\" + counter;\r\n }\r\n getStart() {\r\n return this.start;\r\n }\r\n getEnd() {\r\n return this.end;\r\n }\r\n addEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = {};\r\n }\r\n this.edges[from][to] = true;\r\n }\r\n removeEdge(from, to) {\r\n if (this.edges[from] === undefined) {\r\n return;\r\n }\r\n delete this.edges[from][to];\r\n if (Object.keys(this.edges[from]).length === 0) {\r\n delete this.edges[from];\r\n }\r\n }\r\n listEdges() {\r\n const list = [];\r\n for (const from of Object.keys(this.edges)) {\r\n for (const to of Object.keys(this.edges[from])) {\r\n list.push({ from, to });\r\n }\r\n }\r\n return list;\r\n }\r\n listNodes() {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n set.add(l.from);\r\n set.add(l.to);\r\n }\r\n return Array.from(set.values());\r\n }\r\n hasEdges() {\r\n return Object.keys(this.edges).length > 0;\r\n }\r\n /** return value: end node of to graph */\r\n addGraph(from, to) {\r\n if (to.hasEdges() === false) {\r\n return from;\r\n }\r\n this.addEdge(from, to.getStart());\r\n to.listEdges().forEach(e => this.addEdge(e.from, e.to));\r\n return to.getEnd();\r\n }\r\n toJSON() {\r\n return JSON.stringify(this.edges);\r\n }\r\n toTextEdges() {\r\n let graph = \"\";\r\n for (const l of this.listEdges()) {\r\n graph += `\"${l.from}\" -> \"${l.to}\";\\n`;\r\n }\r\n return graph.trim();\r\n }\r\n setLabel(label) {\r\n this.label = label;\r\n }\r\n toDigraph() {\r\n return `digraph G {\r\nlabelloc=\"t\";\r\nlabel=\"${this.label}\";\r\ngraph [fontname = \"helvetica\"];\r\nnode [fontname = \"helvetica\", shape=\"box\"];\r\nedge [fontname = \"helvetica\"];\r\n${this.toTextEdges()}\r\n}`;\r\n }\r\n listSources(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.to) {\r\n set.add(l.from);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n listTargets(node) {\r\n const set = new Set();\r\n for (const l of this.listEdges()) {\r\n if (node === l.from) {\r\n set.add(l.to);\r\n }\r\n }\r\n return Array.from(set.values());\r\n }\r\n /** removes all nodes containing \"#\" that have one ingoing and one outgoing edge */\r\n reduce() {\r\n for (const node of this.listNodes()) {\r\n if (node.includes(\"#\") === false) {\r\n continue;\r\n }\r\n const sources = this.listSources(node);\r\n const targets = this.listTargets(node);\r\n if (sources.length > 0 && targets.length > 0) {\r\n // hash node in the middle of the graph\r\n for (const s of sources) {\r\n this.removeEdge(s, node);\r\n }\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n for (const s of sources) {\r\n for (const t of targets) {\r\n this.addEdge(s, t);\r\n }\r\n }\r\n }\r\n if (node.startsWith(\"end#\") && sources.length === 0) {\r\n for (const t of targets) {\r\n this.removeEdge(node, t);\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n}\r\nexports.FlowGraph = FlowGraph;\r\n//# sourceMappingURL=flow_graph.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/flow/flow_graph.js?");
8446
8457
 
8447
8458
  /***/ }),
8448
8459
 
@@ -9740,7 +9751,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
9740
9751
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9741
9752
 
9742
9753
  "use strict";
9743
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Help = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst dump_scope_1 = __webpack_require__(/*! ./dump_scope */ \"./node_modules/@abaplint/core/build/src/lsp/dump_scope.js\");\r\nclass Help {\r\n static find(reg, textDocument, position) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);\r\n if (file === undefined) {\r\n return \"file not found\";\r\n }\r\n else {\r\n return this.dumpABAP(file, reg, textDocument, position);\r\n }\r\n }\r\n /////////////////////////////////////////////////\r\n static dumpABAP(file, reg, textDocument, position) {\r\n let content = \"\";\r\n content = `\n <a href=\"#_tokens\" rel=\"no-refresh\">Tokens</a> |\n <a href=\"#_statements\" rel=\"no-refresh\">Statements</a> |\n <a href=\"#_structure\" rel=\"no-refresh\">Structure</a> |\n <a href=\"#_files\" rel=\"no-refresh\">Files</a> |\n <a href=\"#_info\" rel=\"no-refresh\">Info Dump</a>\n <hr>\n ` +\r\n \"<tt>\" + textDocument.uri + \" (\" +\r\n (position.line + 1) + \", \" +\r\n (position.character + 1) + \")</tt>\";\r\n content = content + \"<hr>\";\r\n content = content + this.cursorInformation(reg, textDocument, position, file);\r\n content = content + this.fileInformation(file);\r\n content = content + \"<hr>\";\r\n content = content + this.dumpFiles(reg);\r\n content = content + \"<hr>\";\r\n content = content + this.dumpInfo(file);\r\n return content;\r\n }\r\n static dumpInfo(file) {\r\n const info = file.getInfo();\r\n const dump = {\r\n classDefinitions: info.listClassDefinitions(),\r\n classImplementations: info.listClassImplementations(),\r\n interfaceDefinitions: info.listInterfaceDefinitions(),\r\n forms: info.listFormDefinitions(),\r\n };\r\n const text = JSON.stringify(dump, null, 2);\r\n return `<h3 id=\"_info\">Info Dump</h3><pre>` + text + \"</pre>\";\r\n }\r\n static cursorInformation(reg, textDocument, position, file) {\r\n let ret = \"\";\r\n const found = _lsp_utils_1.LSPUtils.findCursor(reg, { textDocument, position });\r\n if (found !== undefined) {\r\n ret = \"Statement: \" + this.linkToStatement(found.snode.get()) + \"<br>\\n\" +\r\n \"Token: \" + found.token.constructor.name + \"<br>\\n\" +\r\n this.fullPath(file, found.token).value;\r\n }\r\n else {\r\n ret = \"No token found at cursor position\";\r\n }\r\n const obj = reg.getObject(file.getObjectType(), file.getObjectName());\r\n if (obj instanceof _abap_object_1.ABAPObject) {\r\n const spaghetti = new syntax_1.SyntaxLogic(reg, obj).run().spaghetti;\r\n ret = ret + dump_scope_1.DumpScope.dump(spaghetti);\r\n if (found !== undefined) {\r\n ret = ret + \"<hr>Spaghetti Scope by Cursor Position:<br><br>\\n\";\r\n const lookup = spaghetti.lookupPosition(found.token.getStart(), textDocument.uri);\r\n if (lookup) {\r\n const identifier = lookup.getIdentifier();\r\n ret = ret + \"<u>\" + identifier.stype + \", <tt>\" + identifier.sname + \"</tt>, \" + identifier.filename;\r\n ret = ret + \", (\" + identifier.start.getRow() + \", \" + identifier.start.getCol() + \")</u><br>\";\r\n }\r\n else {\r\n ret = ret + \"Not found\";\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n static fullPath(file, token) {\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return { value: \"\", keyword: false };\r\n }\r\n const found = this.traverse(structure, \"\", token);\r\n if (found === undefined) {\r\n return { value: \"\", keyword: false };\r\n }\r\n return { value: \"\\n\\n\" + found.value, keyword: found.keyword };\r\n }\r\n static traverse(node, parents, search) {\r\n let local = parents;\r\n if (local !== \"\") {\r\n local = local + \" -> \";\r\n }\r\n if (node instanceof nodes_1.StructureNode) {\r\n local = local + \"Structure: \" + this.linkToStructure(node.get());\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n local = local + \"Statement: \" + this.linkToStatement(node.get());\r\n }\r\n else if (node instanceof nodes_1.ExpressionNode) {\r\n local = local + \"Expression: \" + this.linkToExpression(node.get());\r\n }\r\n else if (node instanceof nodes_1.TokenNode) {\r\n local = local + \"Token: \" + node.get().constructor.name;\r\n const token = node.get();\r\n if (token.getStr() === search.getStr()\r\n && token.getCol() === search.getCol()\r\n && token.getRow() === search.getRow()) {\r\n const keyword = !(node instanceof nodes_1.TokenNodeRegex);\r\n return { value: local, keyword };\r\n }\r\n }\r\n else {\r\n throw new Error(\"hover, traverse, unexpected node type\");\r\n }\r\n for (const child of node.getChildren()) {\r\n const ret = this.traverse(child, local, search);\r\n if (ret) {\r\n return ret;\r\n }\r\n }\r\n return undefined;\r\n }\r\n static fileInformation(file) {\r\n let content = \"\";\r\n content = content + `<hr><h3 id=\"_tokens\">Tokens</h3>\\n`;\r\n content = content + this.tokens(file);\r\n content = content + `<hr><h3 id=\"_statements\">Statements</h3>\\n`;\r\n content = content + this.buildStatements(file);\r\n content = content + `<hr><h3 id=\"_structure\">Structure</h3>\\n`;\r\n const structure = file.getStructure();\r\n if (structure !== undefined) {\r\n content = content + this.buildStructure([structure]);\r\n }\r\n else {\r\n content = content + \"structure undefined\";\r\n }\r\n return content;\r\n }\r\n static escape(str) {\r\n str = str.replace(/&/g, \"&amp;\");\r\n str = str.replace(/>/g, \"&gt;\");\r\n str = str.replace(/</g, \"&lt;\");\r\n str = str.replace(/\"/g, \"&quot;\");\r\n str = str.replace(/'/g, \"&#039;\");\r\n return str;\r\n }\r\n static linkToStatement(statement) {\r\n return `<a href=\"https://syntax.abaplint.org/#/statement/${statement.constructor.name}\" target=\"_blank\">${statement.constructor.name}</a>\\n`;\r\n }\r\n static linkToStructure(structure) {\r\n return `<a href=\"https://syntax.abaplint.org/#/structure/${structure.constructor.name}\" target=\"_blank\">${structure.constructor.name}</a>\\n`;\r\n }\r\n static linkToExpression(expression) {\r\n return `<a href=\"https://syntax.abaplint.org/#/expression/${expression.constructor.name}\" target=\"_blank\">${expression.constructor.name}</a>\\n`;\r\n }\r\n static outputNodes(nodes) {\r\n let ret = \"<ul>\";\r\n for (const node of nodes) {\r\n let extra = \"\";\r\n switch (node.constructor.name) {\r\n case \"TokenNode\":\r\n case \"TokenNodeRegex\":\r\n extra = node.get().constructor.name + \", \\\"\" + node.get().getStr() + \"\\\"\";\r\n break;\r\n case \"ExpressionNode\":\r\n extra = this.linkToExpression(node.get()) + this.outputNodes(node.getChildren());\r\n break;\r\n default:\r\n break;\r\n }\r\n ret = ret + \"<li>\" + node.constructor.name + \", \" + extra + \"</li>\";\r\n }\r\n return ret + \"</ul>\";\r\n }\r\n static tokens(file) {\r\n let inner = \"<table><tr><td><b>String</b></td><td><b>Type</b></td><td><b>Row</b></td><td><b>Column</b></td></tr>\";\r\n for (const token of file.getTokens()) {\r\n inner = inner + \"<tr><td><tt>\" +\r\n this.escape(token.getStr()) + \"</tt></td><td>\" +\r\n token.constructor.name + \"</td><td align=\\\"right\\\">\" +\r\n token.getRow() + \"</td><td align=\\\"right\\\">\" +\r\n token.getCol() + \"</td></tr>\";\r\n }\r\n inner = inner + \"</table>\";\r\n return inner;\r\n }\r\n static buildStatements(file) {\r\n let output = \"\";\r\n for (const statement of file.getStatements()) {\r\n const row = statement.getStart().getRow();\r\n // getting the class name only works if uglify does not mangle names\r\n output = output +\r\n row + \": \" +\r\n this.linkToStatement(statement.get()) +\r\n \"</div></b>\\n\" + this.outputNodes(statement.getChildren());\r\n }\r\n return output;\r\n }\r\n static buildStructure(nodes) {\r\n let output = \"<ul>\";\r\n for (const node of nodes) {\r\n if (node instanceof nodes_1.StructureNode) {\r\n output = output + \"<li>\" + this.linkToStructure(node.get()) + \", Structure \" + this.buildStructure(node.getChildren()) + \"</li>\";\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n output = output + \"<li>\" + this.linkToStatement(node.get()) + \", Statement</li>\";\r\n }\r\n }\r\n return output + \"</ul>\";\r\n }\r\n static dumpFiles(reg) {\r\n let output = `<h3 id=\"_files\">Files</h3><table>\\n`;\r\n for (const o of reg.getObjects()) {\r\n if (reg.isDependency(o) === true) {\r\n continue;\r\n }\r\n output = output + \"<tr><td valign=\\\"top\\\">\" + o.getType() + \" \" + o.getName() + \"</td><td>\";\r\n for (const f of o.getFiles()) {\r\n output = output + f.getFilename() + \"<br>\";\r\n }\r\n output = output + \"</td></tr>\\n\";\r\n }\r\n return output + \"</table>\\n\";\r\n }\r\n}\r\nexports.Help = Help;\r\n//# sourceMappingURL=help.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/help.js?");
9754
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Help = void 0;\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ \"./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst dump_scope_1 = __webpack_require__(/*! ./dump_scope */ \"./node_modules/@abaplint/core/build/src/lsp/dump_scope.js\");\r\nclass Help {\r\n static find(reg, textDocument, position) {\r\n const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);\r\n if (file === undefined) {\r\n return \"file not found\";\r\n }\r\n else {\r\n return this.dumpABAP(file, reg, textDocument, position);\r\n }\r\n }\r\n /////////////////////////////////////////////////\r\n static dumpABAP(file, reg, textDocument, position) {\r\n let content = \"\";\r\n content = `\r\n <a href=\"#_tokens\" rel=\"no-refresh\">Tokens</a> |\r\n <a href=\"#_statements\" rel=\"no-refresh\">Statements</a> |\r\n <a href=\"#_structure\" rel=\"no-refresh\">Structure</a> |\r\n <a href=\"#_files\" rel=\"no-refresh\">Files</a> |\r\n <a href=\"#_info\" rel=\"no-refresh\">Info Dump</a>\r\n <hr>\r\n ` +\r\n \"<tt>\" + textDocument.uri + \" (\" +\r\n (position.line + 1) + \", \" +\r\n (position.character + 1) + \")</tt>\";\r\n content = content + \"<hr>\";\r\n content = content + this.cursorInformation(reg, textDocument, position, file);\r\n content = content + this.fileInformation(file);\r\n content = content + \"<hr>\";\r\n content = content + this.dumpFiles(reg);\r\n content = content + \"<hr>\";\r\n content = content + this.dumpInfo(file);\r\n return content;\r\n }\r\n static dumpInfo(file) {\r\n const info = file.getInfo();\r\n const dump = {\r\n classDefinitions: info.listClassDefinitions(),\r\n classImplementations: info.listClassImplementations(),\r\n interfaceDefinitions: info.listInterfaceDefinitions(),\r\n forms: info.listFormDefinitions(),\r\n };\r\n const text = JSON.stringify(dump, null, 2);\r\n return `<h3 id=\"_info\">Info Dump</h3><pre>` + text + \"</pre>\";\r\n }\r\n static cursorInformation(reg, textDocument, position, file) {\r\n let ret = \"\";\r\n const found = _lsp_utils_1.LSPUtils.findCursor(reg, { textDocument, position });\r\n if (found !== undefined) {\r\n ret = \"Statement: \" + this.linkToStatement(found.snode.get()) + \"<br>\\n\" +\r\n \"Token: \" + found.token.constructor.name + \"<br>\\n\" +\r\n this.fullPath(file, found.token).value;\r\n }\r\n else {\r\n ret = \"No token found at cursor position\";\r\n }\r\n const obj = reg.getObject(file.getObjectType(), file.getObjectName());\r\n if (obj instanceof _abap_object_1.ABAPObject) {\r\n const spaghetti = new syntax_1.SyntaxLogic(reg, obj).run().spaghetti;\r\n ret = ret + dump_scope_1.DumpScope.dump(spaghetti);\r\n if (found !== undefined) {\r\n ret = ret + \"<hr>Spaghetti Scope by Cursor Position:<br><br>\\n\";\r\n const lookup = spaghetti.lookupPosition(found.token.getStart(), textDocument.uri);\r\n if (lookup) {\r\n const identifier = lookup.getIdentifier();\r\n ret = ret + \"<u>\" + identifier.stype + \", <tt>\" + identifier.sname + \"</tt>, \" + identifier.filename;\r\n ret = ret + \", (\" + identifier.start.getRow() + \", \" + identifier.start.getCol() + \")</u><br>\";\r\n }\r\n else {\r\n ret = ret + \"Not found\";\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n static fullPath(file, token) {\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return { value: \"\", keyword: false };\r\n }\r\n const found = this.traverse(structure, \"\", token);\r\n if (found === undefined) {\r\n return { value: \"\", keyword: false };\r\n }\r\n return { value: \"\\n\\n\" + found.value, keyword: found.keyword };\r\n }\r\n static traverse(node, parents, search) {\r\n let local = parents;\r\n if (local !== \"\") {\r\n local = local + \" -> \";\r\n }\r\n if (node instanceof nodes_1.StructureNode) {\r\n local = local + \"Structure: \" + this.linkToStructure(node.get());\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n local = local + \"Statement: \" + this.linkToStatement(node.get());\r\n }\r\n else if (node instanceof nodes_1.ExpressionNode) {\r\n local = local + \"Expression: \" + this.linkToExpression(node.get());\r\n }\r\n else if (node instanceof nodes_1.TokenNode) {\r\n local = local + \"Token: \" + node.get().constructor.name;\r\n const token = node.get();\r\n if (token.getStr() === search.getStr()\r\n && token.getCol() === search.getCol()\r\n && token.getRow() === search.getRow()) {\r\n const keyword = !(node instanceof nodes_1.TokenNodeRegex);\r\n return { value: local, keyword };\r\n }\r\n }\r\n else {\r\n throw new Error(\"hover, traverse, unexpected node type\");\r\n }\r\n for (const child of node.getChildren()) {\r\n const ret = this.traverse(child, local, search);\r\n if (ret) {\r\n return ret;\r\n }\r\n }\r\n return undefined;\r\n }\r\n static fileInformation(file) {\r\n let content = \"\";\r\n content = content + `<hr><h3 id=\"_tokens\">Tokens</h3>\\n`;\r\n content = content + this.tokens(file);\r\n content = content + `<hr><h3 id=\"_statements\">Statements</h3>\\n`;\r\n content = content + this.buildStatements(file);\r\n content = content + `<hr><h3 id=\"_structure\">Structure</h3>\\n`;\r\n const structure = file.getStructure();\r\n if (structure !== undefined) {\r\n content = content + this.buildStructure([structure]);\r\n }\r\n else {\r\n content = content + \"structure undefined\";\r\n }\r\n return content;\r\n }\r\n static escape(str) {\r\n str = str.replace(/&/g, \"&amp;\");\r\n str = str.replace(/>/g, \"&gt;\");\r\n str = str.replace(/</g, \"&lt;\");\r\n str = str.replace(/\"/g, \"&quot;\");\r\n str = str.replace(/'/g, \"&#039;\");\r\n return str;\r\n }\r\n static linkToStatement(statement) {\r\n return `<a href=\"https://syntax.abaplint.org/#/statement/${statement.constructor.name}\" target=\"_blank\">${statement.constructor.name}</a>\\n`;\r\n }\r\n static linkToStructure(structure) {\r\n return `<a href=\"https://syntax.abaplint.org/#/structure/${structure.constructor.name}\" target=\"_blank\">${structure.constructor.name}</a>\\n`;\r\n }\r\n static linkToExpression(expression) {\r\n return `<a href=\"https://syntax.abaplint.org/#/expression/${expression.constructor.name}\" target=\"_blank\">${expression.constructor.name}</a>\\n`;\r\n }\r\n static outputNodes(nodes) {\r\n let ret = \"<ul>\";\r\n for (const node of nodes) {\r\n let extra = \"\";\r\n switch (node.constructor.name) {\r\n case \"TokenNode\":\r\n case \"TokenNodeRegex\":\r\n extra = node.get().constructor.name + \", \\\"\" + node.get().getStr() + \"\\\"\";\r\n break;\r\n case \"ExpressionNode\":\r\n extra = this.linkToExpression(node.get()) + this.outputNodes(node.getChildren());\r\n break;\r\n default:\r\n break;\r\n }\r\n ret = ret + \"<li>\" + node.constructor.name + \", \" + extra + \"</li>\";\r\n }\r\n return ret + \"</ul>\";\r\n }\r\n static tokens(file) {\r\n let inner = \"<table><tr><td><b>String</b></td><td><b>Type</b></td><td><b>Row</b></td><td><b>Column</b></td></tr>\";\r\n for (const token of file.getTokens()) {\r\n inner = inner + \"<tr><td><tt>\" +\r\n this.escape(token.getStr()) + \"</tt></td><td>\" +\r\n token.constructor.name + \"</td><td align=\\\"right\\\">\" +\r\n token.getRow() + \"</td><td align=\\\"right\\\">\" +\r\n token.getCol() + \"</td></tr>\";\r\n }\r\n inner = inner + \"</table>\";\r\n return inner;\r\n }\r\n static buildStatements(file) {\r\n let output = \"\";\r\n for (const statement of file.getStatements()) {\r\n const row = statement.getStart().getRow();\r\n // getting the class name only works if uglify does not mangle names\r\n output = output +\r\n row + \": \" +\r\n this.linkToStatement(statement.get()) +\r\n \"</div></b>\\n\" + this.outputNodes(statement.getChildren());\r\n }\r\n return output;\r\n }\r\n static buildStructure(nodes) {\r\n let output = \"<ul>\";\r\n for (const node of nodes) {\r\n if (node instanceof nodes_1.StructureNode) {\r\n output = output + \"<li>\" + this.linkToStructure(node.get()) + \", Structure \" + this.buildStructure(node.getChildren()) + \"</li>\";\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n output = output + \"<li>\" + this.linkToStatement(node.get()) + \", Statement</li>\";\r\n }\r\n }\r\n return output + \"</ul>\";\r\n }\r\n static dumpFiles(reg) {\r\n let output = `<h3 id=\"_files\">Files</h3><table>\\n`;\r\n for (const o of reg.getObjects()) {\r\n if (reg.isDependency(o) === true) {\r\n continue;\r\n }\r\n output = output + \"<tr><td valign=\\\"top\\\">\" + o.getType() + \" \" + o.getName() + \"</td><td>\";\r\n for (const f of o.getFiles()) {\r\n output = output + f.getFilename() + \"<br>\";\r\n }\r\n output = output + \"</td></tr>\\n\";\r\n }\r\n return output + \"</table>\\n\";\r\n }\r\n}\r\nexports.Help = Help;\r\n//# sourceMappingURL=help.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/lsp/help.js?");
9744
9755
 
9745
9756
  /***/ }),
9746
9757
 
@@ -11159,7 +11170,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11159
11170
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11160
11171
 
11161
11172
  "use strict";
11162
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.83.24\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n addFiles(files) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(undefined, iobj);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n this.issues = [];\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11173
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.84.2\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n addFiles(files) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(undefined, iobj);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n this.issues = [];\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11163
11174
 
11164
11175
  /***/ }),
11165
11176
 
@@ -11170,7 +11181,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
11170
11181
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11171
11182
 
11172
11183
  "use strict";
11173
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SevenBitAscii = exports.SevenBitAsciiConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SevenBitAsciiConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SevenBitAsciiConf = SevenBitAsciiConf;\r\nclass SevenBitAscii {\r\n constructor() {\r\n this.conf = new SevenBitAsciiConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"7bit_ascii\",\r\n title: \"Check for 7bit ascii\",\r\n shortDescription: `Only allow characters from the 7bit ASCII set.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/05/\n\nCheckes files with extension \".abap\" and \".asddls\"`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const output = [];\r\n for (const file of obj.getFiles()) {\r\n const filename = file.getFilename();\r\n if (filename.endsWith(\".abap\") || filename.endsWith(\".asddls\")) {\r\n const rows = file.getRawRows();\r\n for (let i = 0; i < rows.length; i++) {\r\n const found = /[\\u007f-\\uffff]/.exec(rows[i]);\r\n if (found !== null) {\r\n const column = found.index + 1;\r\n const start = new position_1.Position(i + 1, column);\r\n const end = new position_1.Position(i + 1, column + 1);\r\n const message = \"Contains non 7 bit ascii character\";\r\n const issue = issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n // method getRawRows() splits by newline, so the carraige return\r\n // should always be last character if present\r\n const carriage = /\\r.+$/.exec(rows[i]);\r\n if (carriage !== null) {\r\n const column = carriage.index + 1;\r\n const start = new position_1.Position(i + 1, column);\r\n const end = new position_1.Position(i + 1, column + 1);\r\n const message = \"Dangling carriage return\";\r\n const issue = issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.SevenBitAscii = SevenBitAscii;\r\n//# sourceMappingURL=7bit_ascii.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js?");
11184
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SevenBitAscii = exports.SevenBitAsciiConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SevenBitAsciiConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SevenBitAsciiConf = SevenBitAsciiConf;\r\nclass SevenBitAscii {\r\n constructor() {\r\n this.conf = new SevenBitAsciiConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"7bit_ascii\",\r\n title: \"Check for 7bit ascii\",\r\n shortDescription: `Only allow characters from the 7bit ASCII set.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/05/\r\n\r\nCheckes files with extension \".abap\" and \".asddls\"`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const output = [];\r\n for (const file of obj.getFiles()) {\r\n const filename = file.getFilename();\r\n if (filename.endsWith(\".abap\") || filename.endsWith(\".asddls\")) {\r\n const rows = file.getRawRows();\r\n for (let i = 0; i < rows.length; i++) {\r\n const found = /[\\u007f-\\uffff]/.exec(rows[i]);\r\n if (found !== null) {\r\n const column = found.index + 1;\r\n const start = new position_1.Position(i + 1, column);\r\n const end = new position_1.Position(i + 1, column + 1);\r\n const message = \"Contains non 7 bit ascii character\";\r\n const issue = issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n // method getRawRows() splits by newline, so the carraige return\r\n // should always be last character if present\r\n const carriage = /\\r.+$/.exec(rows[i]);\r\n if (carriage !== null) {\r\n const column = carriage.index + 1;\r\n const start = new position_1.Position(i + 1, column);\r\n const end = new position_1.Position(i + 1, column + 1);\r\n const message = \"Dangling carriage return\";\r\n const issue = issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.SevenBitAscii = SevenBitAscii;\r\n//# sourceMappingURL=7bit_ascii.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js?");
11174
11185
 
11175
11186
  /***/ }),
11176
11187
 
@@ -11225,7 +11236,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11225
11236
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11226
11237
 
11227
11238
  "use strict";
11228
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Abapdoc = exports.AbapdocConf = void 0;\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass AbapdocConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Check local classes and interfaces for abapdoc. */\r\n this.checkLocal = false;\r\n }\r\n}\r\nexports.AbapdocConf = AbapdocConf;\r\nclass Abapdoc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AbapdocConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"abapdoc\",\r\n title: \"Check abapdoc\",\r\n shortDescription: `Various checks regarding abapdoc.\nBase rule checks for existence of abapdoc for public class methods and all interface methods.`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const rows = file.getRawRows();\r\n let methods = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n if (this.conf.checkLocal === false && classDef.isLocal === true) {\r\n continue;\r\n }\r\n methods = methods.concat(classDef.methods.filter(m => m.visibility === visibility_1.Visibility.Public));\r\n }\r\n for (const interfaceDef of file.getInfo().listInterfaceDefinitions()) {\r\n if (this.conf.checkLocal === false && interfaceDef.isLocal === true) {\r\n continue;\r\n }\r\n methods = methods.concat(interfaceDef.methods);\r\n }\r\n for (const method of methods) {\r\n if (method.isRedefinition === true) {\r\n continue;\r\n }\r\n const previousRow = method.identifier.getStart().getRow() - 2;\r\n if (!(rows[previousRow].trim().substring(0, 2) === \"\\\"!\")) {\r\n const message = \"Missing ABAP Doc for method \" + method.identifier.getToken().getStr();\r\n const issue = issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Abapdoc = Abapdoc;\r\n//# sourceMappingURL=abapdoc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/abapdoc.js?");
11239
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Abapdoc = exports.AbapdocConf = void 0;\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass AbapdocConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Check local classes and interfaces for abapdoc. */\r\n this.checkLocal = false;\r\n }\r\n}\r\nexports.AbapdocConf = AbapdocConf;\r\nclass Abapdoc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AbapdocConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"abapdoc\",\r\n title: \"Check abapdoc\",\r\n shortDescription: `Various checks regarding abapdoc.\r\nBase rule checks for existence of abapdoc for public class methods and all interface methods.`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const rows = file.getRawRows();\r\n let methods = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n if (this.conf.checkLocal === false && classDef.isLocal === true) {\r\n continue;\r\n }\r\n methods = methods.concat(classDef.methods.filter(m => m.visibility === visibility_1.Visibility.Public));\r\n }\r\n for (const interfaceDef of file.getInfo().listInterfaceDefinitions()) {\r\n if (this.conf.checkLocal === false && interfaceDef.isLocal === true) {\r\n continue;\r\n }\r\n methods = methods.concat(interfaceDef.methods);\r\n }\r\n for (const method of methods) {\r\n if (method.isRedefinition === true) {\r\n continue;\r\n }\r\n const previousRow = method.identifier.getStart().getRow() - 2;\r\n if (!(rows[previousRow].trim().substring(0, 2) === \"\\\"!\")) {\r\n const message = \"Missing ABAP Doc for method \" + method.identifier.getToken().getStr();\r\n const issue = issue_1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Abapdoc = Abapdoc;\r\n//# sourceMappingURL=abapdoc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/abapdoc.js?");
11229
11240
 
11230
11241
  /***/ }),
11231
11242
 
@@ -11236,7 +11247,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11236
11247
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11237
11248
 
11238
11249
  "use strict";
11239
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AlignParameters = exports.AlignParametersConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass AlignParametersConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AlignParametersConf = AlignParametersConf;\r\nclass AlignParameters extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AlignParametersConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"align_parameters\",\r\n title: \"Align Parameters\",\r\n shortDescription: `Checks for vertially aligned parameters`,\r\n extendedInformation: `Checks:\n* function module calls\n* method calls\n* VALUE constructors\n* NEW constructors\n* RAISE EXCEPTION statements\n* CREATE OBJECT statements\n* RAISE EVENT statements\n\nhttps://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters\n\nDoes not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/\n\nAlso https://rules.abaplint.org/max_one_method_parameter_per_line/ can help aligning parameter syntax`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide],\r\n badExample: `CALL FUNCTION 'FOOBAR'\n EXPORTING\n foo = 2\n parameter = 3.\n\nfoobar( moo = 1\n param = 1 ).\n\nfoo = VALUE #(\n foo = bar\n moo = 2 ).`,\r\n goodExample: `CALL FUNCTION 'FOOBAR'\n EXPORTING\n foo = 2\n parameter = 3.\n\nfoobar( moo = 1\n param = 1 ).\n\nfoo = VALUE #(\n foo = bar\n moo = 2 ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues; // parser error\r\n }\r\n const candidates = [];\r\n candidates.push(...this.functionParameterCandidates(stru));\r\n candidates.push(...this.methodCallParamCandidates(stru));\r\n candidates.push(...this.valueBodyCandidates(stru));\r\n candidates.push(...this.raiseAndCreateCandidates(stru));\r\n candidates.push(...this.newCandidates(stru));\r\n for (const c of candidates) {\r\n const i = this.checkCandidate(c, file);\r\n if (i) {\r\n issues.push(i);\r\n }\r\n }\r\n return issues;\r\n }\r\n checkCandidate(candidate, file) {\r\n if (candidate.parameters.length === 0) {\r\n return undefined;\r\n }\r\n let expectedEqualsColumn = 0;\r\n for (const p of candidate.parameters) {\r\n const currentCol = p.left.getLastToken().getCol() + p.left.getLastToken().getStr().length + 1;\r\n if (currentCol > expectedEqualsColumn) {\r\n expectedEqualsColumn = currentCol;\r\n }\r\n }\r\n for (const p of candidate.parameters) {\r\n if (p.eq.getCol() !== expectedEqualsColumn) {\r\n const message = \"Align parameters to column \" + expectedEqualsColumn;\r\n return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newCandidates(stru) {\r\n const candidates = [];\r\n for (const vb of stru.findAllExpressionsRecursive(Expressions.NewObject)) {\r\n const parameters = [];\r\n const fieldAssignments = vb.findDirectExpressions(Expressions.FieldAssignment);\r\n if (fieldAssignments.length >= 2) {\r\n for (const fs of fieldAssignments) {\r\n const children = fs.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n continue;\r\n }\r\n }\r\n const list = vb.findDirectExpression(Expressions.ParameterListS);\r\n if (list) {\r\n for (const c of list.getChildren()) {\r\n const children = c.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n }\r\n return candidates;\r\n }\r\n valueBodyCandidates(stru) {\r\n const candidates = [];\r\n for (const vb of stru.findAllExpressionsRecursive(Expressions.ValueBody)) {\r\n const parameters = [];\r\n const fieldAssignments = vb.findDirectExpressions(Expressions.FieldAssignment);\r\n if (fieldAssignments.length <= 1) {\r\n continue;\r\n }\r\n for (const fs of fieldAssignments) {\r\n const children = fs.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n raiseAndCreateCandidates(stru) {\r\n const candidates = [];\r\n const statements = stru.findAllStatements(__1.Statements.Raise);\r\n statements.push(...stru.findAllStatements(__1.Statements.CreateObject));\r\n statements.push(...stru.findAllStatements(__1.Statements.RaiseEvent));\r\n for (const raise of statements) {\r\n const parameters = [];\r\n const param = raise.findDirectExpression(Expressions.ParameterListS);\r\n for (const p of (param === null || param === void 0 ? void 0 : param.getChildren()) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n const ex = raise.findDirectExpression(Expressions.ParameterListExceptions);\r\n for (const e of (ex === null || ex === void 0 ? void 0 : ex.getChildren()) || []) {\r\n const children = e.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n methodCallParamCandidates(stru) {\r\n var _a, _b, _c;\r\n const candidates = [];\r\n for (const mcp of stru.findAllExpressionsRecursive(Expressions.MethodCallParam)) {\r\n const parameters = [];\r\n for (const param of ((_a = mcp.findDirectExpression(Expressions.ParameterListS)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\r\n const children = param.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n const mp = mcp.findDirectExpression(Expressions.MethodParameters);\r\n if (mp) {\r\n for (const p of ((_b = mp.findDirectExpression(Expressions.ParameterListS)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const l of mp.findDirectExpressions(Expressions.ParameterListT)) {\r\n for (const p of l.findDirectExpressions(Expressions.ParameterT) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n const rec = mp.findDirectExpression(Expressions.ParameterT);\r\n if (rec) {\r\n const children = rec.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const ex of ((_c = mp.findDirectExpression(Expressions.ParameterListExceptions)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {\r\n const children = ex.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n functionParameterCandidates(stru) {\r\n const candidates = [];\r\n for (const fp of stru.findAllExpressionsRecursive(Expressions.FunctionParameters)) {\r\n const parameters = [];\r\n for (const p of fp.findAllExpressions(Expressions.FunctionExportingParameter)) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const list of fp.findDirectExpressions(Expressions.ParameterListT)) {\r\n for (const pt of list.findDirectExpressions(Expressions.ParameterT)) {\r\n const children = pt.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n const list = fp.findDirectExpression(Expressions.ParameterListExceptions);\r\n if (list) {\r\n for (const pt of list.findDirectExpressions(Expressions.ParameterException)) {\r\n const children = pt.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n}\r\nexports.AlignParameters = AlignParameters;\r\n//# sourceMappingURL=align_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/align_parameters.js?");
11250
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AlignParameters = exports.AlignParametersConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass AlignParametersConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AlignParametersConf = AlignParametersConf;\r\nclass AlignParameters extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AlignParametersConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"align_parameters\",\r\n title: \"Align Parameters\",\r\n shortDescription: `Checks for vertially aligned parameters`,\r\n extendedInformation: `Checks:\r\n* function module calls\r\n* method calls\r\n* VALUE constructors\r\n* NEW constructors\r\n* RAISE EXCEPTION statements\r\n* CREATE OBJECT statements\r\n* RAISE EVENT statements\r\n\r\nhttps://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-parameters\r\n\r\nDoes not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/\r\n\r\nAlso https://rules.abaplint.org/max_one_method_parameter_per_line/ can help aligning parameter syntax`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide],\r\n badExample: `CALL FUNCTION 'FOOBAR'\r\n EXPORTING\r\n foo = 2\r\n parameter = 3.\r\n\r\nfoobar( moo = 1\r\n param = 1 ).\r\n\r\nfoo = VALUE #(\r\n foo = bar\r\n moo = 2 ).`,\r\n goodExample: `CALL FUNCTION 'FOOBAR'\r\n EXPORTING\r\n foo = 2\r\n parameter = 3.\r\n\r\nfoobar( moo = 1\r\n param = 1 ).\r\n\r\nfoo = VALUE #(\r\n foo = bar\r\n moo = 2 ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues; // parser error\r\n }\r\n const candidates = [];\r\n candidates.push(...this.functionParameterCandidates(stru));\r\n candidates.push(...this.methodCallParamCandidates(stru));\r\n candidates.push(...this.valueBodyCandidates(stru));\r\n candidates.push(...this.raiseAndCreateCandidates(stru));\r\n candidates.push(...this.newCandidates(stru));\r\n for (const c of candidates) {\r\n const i = this.checkCandidate(c, file);\r\n if (i) {\r\n issues.push(i);\r\n }\r\n }\r\n return issues;\r\n }\r\n checkCandidate(candidate, file) {\r\n if (candidate.parameters.length === 0) {\r\n return undefined;\r\n }\r\n let expectedEqualsColumn = 0;\r\n for (const p of candidate.parameters) {\r\n const currentCol = p.left.getLastToken().getCol() + p.left.getLastToken().getStr().length + 1;\r\n if (currentCol > expectedEqualsColumn) {\r\n expectedEqualsColumn = currentCol;\r\n }\r\n }\r\n for (const p of candidate.parameters) {\r\n if (p.eq.getCol() !== expectedEqualsColumn) {\r\n const message = \"Align parameters to column \" + expectedEqualsColumn;\r\n return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newCandidates(stru) {\r\n const candidates = [];\r\n for (const vb of stru.findAllExpressionsRecursive(Expressions.NewObject)) {\r\n const parameters = [];\r\n const fieldAssignments = vb.findDirectExpressions(Expressions.FieldAssignment);\r\n if (fieldAssignments.length >= 2) {\r\n for (const fs of fieldAssignments) {\r\n const children = fs.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n continue;\r\n }\r\n }\r\n const list = vb.findDirectExpression(Expressions.ParameterListS);\r\n if (list) {\r\n for (const c of list.getChildren()) {\r\n const children = c.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n }\r\n return candidates;\r\n }\r\n valueBodyCandidates(stru) {\r\n const candidates = [];\r\n for (const vb of stru.findAllExpressionsRecursive(Expressions.ValueBody)) {\r\n const parameters = [];\r\n const fieldAssignments = vb.findDirectExpressions(Expressions.FieldAssignment);\r\n if (fieldAssignments.length <= 1) {\r\n continue;\r\n }\r\n for (const fs of fieldAssignments) {\r\n const children = fs.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n raiseAndCreateCandidates(stru) {\r\n const candidates = [];\r\n const statements = stru.findAllStatements(__1.Statements.Raise);\r\n statements.push(...stru.findAllStatements(__1.Statements.CreateObject));\r\n statements.push(...stru.findAllStatements(__1.Statements.RaiseEvent));\r\n for (const raise of statements) {\r\n const parameters = [];\r\n const param = raise.findDirectExpression(Expressions.ParameterListS);\r\n for (const p of (param === null || param === void 0 ? void 0 : param.getChildren()) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n const ex = raise.findDirectExpression(Expressions.ParameterListExceptions);\r\n for (const e of (ex === null || ex === void 0 ? void 0 : ex.getChildren()) || []) {\r\n const children = e.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n methodCallParamCandidates(stru) {\r\n var _a, _b, _c;\r\n const candidates = [];\r\n for (const mcp of stru.findAllExpressionsRecursive(Expressions.MethodCallParam)) {\r\n const parameters = [];\r\n for (const param of ((_a = mcp.findDirectExpression(Expressions.ParameterListS)) === null || _a === void 0 ? void 0 : _a.getChildren()) || []) {\r\n const children = param.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n const mp = mcp.findDirectExpression(Expressions.MethodParameters);\r\n if (mp) {\r\n for (const p of ((_b = mp.findDirectExpression(Expressions.ParameterListS)) === null || _b === void 0 ? void 0 : _b.getChildren()) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const l of mp.findDirectExpressions(Expressions.ParameterListT)) {\r\n for (const p of l.findDirectExpressions(Expressions.ParameterT) || []) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n const rec = mp.findDirectExpression(Expressions.ParameterT);\r\n if (rec) {\r\n const children = rec.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const ex of ((_c = mp.findDirectExpression(Expressions.ParameterListExceptions)) === null || _c === void 0 ? void 0 : _c.getChildren()) || []) {\r\n const children = ex.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n functionParameterCandidates(stru) {\r\n const candidates = [];\r\n for (const fp of stru.findAllExpressionsRecursive(Expressions.FunctionParameters)) {\r\n const parameters = [];\r\n for (const p of fp.findAllExpressions(Expressions.FunctionExportingParameter)) {\r\n const children = p.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n for (const list of fp.findDirectExpressions(Expressions.ParameterListT)) {\r\n for (const pt of list.findDirectExpressions(Expressions.ParameterT)) {\r\n const children = pt.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n const list = fp.findDirectExpression(Expressions.ParameterListExceptions);\r\n if (list) {\r\n for (const pt of list.findDirectExpressions(Expressions.ParameterException)) {\r\n const children = pt.getChildren();\r\n if (children.length < 3) {\r\n continue; // unexpected\r\n }\r\n parameters.push({\r\n left: children[0],\r\n eq: children[1].getFirstToken().getStart(),\r\n right: children[2],\r\n });\r\n }\r\n }\r\n if (parameters.length > 0) {\r\n candidates.push({ parameters });\r\n }\r\n }\r\n return candidates;\r\n }\r\n}\r\nexports.AlignParameters = AlignParameters;\r\n//# sourceMappingURL=align_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/align_parameters.js?");
11240
11251
 
11241
11252
  /***/ }),
11242
11253
 
@@ -11269,7 +11280,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11269
11280
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11270
11281
 
11271
11282
  "use strict";
11272
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AmbiguousStatement = exports.AmbiguousStatementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass AmbiguousStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AmbiguousStatementConf = AmbiguousStatementConf;\r\nclass AmbiguousStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AmbiguousStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"ambiguous_statement\",\r\n title: \"Check for ambigious statements\",\r\n shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table\nAdd \"TABLE\" keyword or \"@\" for escaping SQL variables\n\nOnly works if the target version is 740sp05 or above`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `DELETE foo FROM bar.\nMODIFY foo FROM bar.`,\r\n goodExample: `DELETE foo FROM @bar.\nMODIFY TABLE foo FROM bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Ambiguous statement. Use explicit syntax.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp05) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n let match = false;\r\n if (statement.get() instanceof Statements.DeleteDatabase) {\r\n match = this.tryMatch(statement, this.reg, Statements.DeleteInternal);\r\n }\r\n else if (statement.get() instanceof Statements.DeleteInternal) {\r\n match = this.tryMatch(statement, this.reg, Statements.DeleteDatabase);\r\n }\r\n else if (statement.get() instanceof Statements.ModifyInternal) {\r\n match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase);\r\n }\r\n else if (statement.get() instanceof Statements.ModifyDatabase) {\r\n match = this.tryMatch(statement, this.reg, Statements.ModifyInternal);\r\n }\r\n if (match) {\r\n const issue = issue_1.Issue.atStatement(file, statement, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n tryMatch(st, reg, type1) {\r\n const ver = reg.getConfig().getVersion();\r\n const tokens = st.getTokens().slice(0);\r\n tokens.pop();\r\n const match = combi_1.Combi.run(new type1().getMatcher(), tokens, ver);\r\n return match !== undefined;\r\n }\r\n}\r\nexports.AmbiguousStatement = AmbiguousStatement;\r\n//# sourceMappingURL=ambiguous_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js?");
11283
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AmbiguousStatement = exports.AmbiguousStatementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst combi_1 = __webpack_require__(/*! ../abap/2_statements/combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass AmbiguousStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.AmbiguousStatementConf = AmbiguousStatementConf;\r\nclass AmbiguousStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AmbiguousStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"ambiguous_statement\",\r\n title: \"Check for ambigious statements\",\r\n shortDescription: `Checks for ambiguity between deleting or modifying from internal and database table\r\nAdd \"TABLE\" keyword or \"@\" for escaping SQL variables\r\n\r\nOnly works if the target version is 740sp05 or above`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `DELETE foo FROM bar.\r\nMODIFY foo FROM bar.`,\r\n goodExample: `DELETE foo FROM @bar.\r\nMODIFY TABLE foo FROM bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Ambiguous statement. Use explicit syntax.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp05) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n let match = false;\r\n if (statement.get() instanceof Statements.DeleteDatabase) {\r\n match = this.tryMatch(statement, this.reg, Statements.DeleteInternal);\r\n }\r\n else if (statement.get() instanceof Statements.DeleteInternal) {\r\n match = this.tryMatch(statement, this.reg, Statements.DeleteDatabase);\r\n }\r\n else if (statement.get() instanceof Statements.ModifyInternal) {\r\n match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase);\r\n }\r\n else if (statement.get() instanceof Statements.ModifyDatabase) {\r\n match = this.tryMatch(statement, this.reg, Statements.ModifyInternal);\r\n }\r\n if (match) {\r\n const issue = issue_1.Issue.atStatement(file, statement, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n tryMatch(st, reg, type1) {\r\n const ver = reg.getConfig().getVersion();\r\n const tokens = st.getTokens().slice(0);\r\n tokens.pop();\r\n const match = combi_1.Combi.run(new type1().getMatcher(), tokens, ver);\r\n return match !== undefined;\r\n }\r\n}\r\nexports.AmbiguousStatement = AmbiguousStatement;\r\n//# sourceMappingURL=ambiguous_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js?");
11273
11284
 
11274
11285
  /***/ }),
11275
11286
 
@@ -11280,7 +11291,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11280
11291
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11281
11292
 
11282
11293
  "use strict";
11283
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AvoidUse = exports.AvoidUseConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass AvoidUseConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects DEFINE (macro definitions) */\r\n this.define = true;\r\n /** Detects statics */\r\n this.statics = true;\r\n /** Detects DEFAULT KEY definitions, from version v740sp02 and up */\r\n this.defaultKey = true;\r\n /** Detects BREAK and BREAK-POINTS */\r\n this.break = true;\r\n /** Detects DESCRIBE TABLE LINES, use lines() instead */\r\n this.describeLines = true;\r\n }\r\n}\r\nexports.AvoidUseConf = AvoidUseConf;\r\nclass AvoidUse extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AvoidUseConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"avoid_use\",\r\n title: \"Avoid use of certain statements\",\r\n shortDescription: `Detects usage of certain statements.`,\r\n extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key\n\nMacros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm\n\nSTATICS: use CLASS-DATA instead\n\nDESCRIBE TABLE LINES: use lines() instead (quickfix exists)`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(statement) {\r\n return \"Avoid use of \" + statement;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n let isStaticsBlock = false;\r\n for (const statementNode of file.getStatements()) {\r\n const statement = statementNode.get();\r\n let message = undefined;\r\n let fix = undefined;\r\n if (this.conf.define && statement instanceof Statements.Define) {\r\n message = \"DEFINE\";\r\n }\r\n else if (this.conf.describeLines && statement instanceof Statements.Describe) {\r\n const children = statementNode.getChildren();\r\n if (children.length === 6 && children[3].getFirstToken().getStr().toUpperCase() === \"LINES\") {\r\n message = \"DESCRIBE LINES, use lines() instead\";\r\n fix = this.getDescribeLinesFix(file, statementNode);\r\n }\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.StaticBegin) {\r\n isStaticsBlock = true;\r\n message = \"STATICS\";\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.StaticEnd) {\r\n isStaticsBlock = false;\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.Static && isStaticsBlock === false) {\r\n message = \"STATICS\";\r\n }\r\n else if (this.conf.break && statement instanceof Statements.Break) {\r\n message = \"BREAK/BREAK-POINT\";\r\n }\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n if (this.conf.defaultKey\r\n && (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02\r\n || this.reg.getConfig().getVersion() === version_1.Version.Cloud)\r\n && (statement instanceof Statements.Data || statement instanceof Statements.Type)) {\r\n const tt = (_a = statementNode.findFirstExpression(expressions_1.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.TypeTableKey);\r\n const token = tt === null || tt === void 0 ? void 0 : tt.findDirectTokenByText(\"DEFAULT\");\r\n if (tt && token) {\r\n message = \"DEFAULT KEY\";\r\n issues.push(issue_1.Issue.atToken(file, token, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getDescribeLinesFix(file, statementNode) {\r\n const children = statementNode.getChildren();\r\n const target = children[4].concatTokens();\r\n const source = children[2].concatTokens();\r\n const startPosition = children[0].getFirstToken().getStart();\r\n const insertText = target + \" = lines( \" + source + \" ).\";\r\n const deleteFix = edit_helper_1.EditHelper.deleteStatement(file, statementNode);\r\n const insertFix = edit_helper_1.EditHelper.insertAt(file, startPosition, insertText);\r\n const finalFix = edit_helper_1.EditHelper.merge(deleteFix, insertFix);\r\n return finalFix;\r\n }\r\n}\r\nexports.AvoidUse = AvoidUse;\r\n//# sourceMappingURL=avoid_use.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/avoid_use.js?");
11294
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.AvoidUse = exports.AvoidUseConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass AvoidUseConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects DEFINE (macro definitions) */\r\n this.define = true;\r\n /** Detects statics */\r\n this.statics = true;\r\n /** Detects DEFAULT KEY definitions, from version v740sp02 and up */\r\n this.defaultKey = true;\r\n /** Detects BREAK and BREAK-POINTS */\r\n this.break = true;\r\n /** Detects DESCRIBE TABLE LINES, use lines() instead */\r\n this.describeLines = true;\r\n }\r\n}\r\nexports.AvoidUseConf = AvoidUseConf;\r\nclass AvoidUse extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new AvoidUseConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"avoid_use\",\r\n title: \"Avoid use of certain statements\",\r\n shortDescription: `Detects usage of certain statements.`,\r\n extendedInformation: `DEFAULT KEY: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-default-key\r\n\r\nMacros: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abenmacros_guidl.htm\r\n\r\nSTATICS: use CLASS-DATA instead\r\n\r\nDESCRIBE TABLE LINES: use lines() instead (quickfix exists)`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(statement) {\r\n return \"Avoid use of \" + statement;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n let isStaticsBlock = false;\r\n for (const statementNode of file.getStatements()) {\r\n const statement = statementNode.get();\r\n let message = undefined;\r\n let fix = undefined;\r\n if (this.conf.define && statement instanceof Statements.Define) {\r\n message = \"DEFINE\";\r\n }\r\n else if (this.conf.describeLines && statement instanceof Statements.Describe) {\r\n const children = statementNode.getChildren();\r\n if (children.length === 6 && children[3].getFirstToken().getStr().toUpperCase() === \"LINES\") {\r\n message = \"DESCRIBE LINES, use lines() instead\";\r\n fix = this.getDescribeLinesFix(file, statementNode);\r\n }\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.StaticBegin) {\r\n isStaticsBlock = true;\r\n message = \"STATICS\";\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.StaticEnd) {\r\n isStaticsBlock = false;\r\n }\r\n else if (this.conf.statics && statement instanceof Statements.Static && isStaticsBlock === false) {\r\n message = \"STATICS\";\r\n }\r\n else if (this.conf.break && statement instanceof Statements.Break) {\r\n message = \"BREAK/BREAK-POINT\";\r\n }\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n if (this.conf.defaultKey\r\n && (this.reg.getConfig().getVersion() >= version_1.Version.v740sp02\r\n || this.reg.getConfig().getVersion() === version_1.Version.Cloud)\r\n && (statement instanceof Statements.Data || statement instanceof Statements.Type)) {\r\n const tt = (_a = statementNode.findFirstExpression(expressions_1.TypeTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(expressions_1.TypeTableKey);\r\n const token = tt === null || tt === void 0 ? void 0 : tt.findDirectTokenByText(\"DEFAULT\");\r\n if (tt && token) {\r\n message = \"DEFAULT KEY\";\r\n issues.push(issue_1.Issue.atToken(file, token, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getDescribeLinesFix(file, statementNode) {\r\n const children = statementNode.getChildren();\r\n const target = children[4].concatTokens();\r\n const source = children[2].concatTokens();\r\n const startPosition = children[0].getFirstToken().getStart();\r\n const insertText = target + \" = lines( \" + source + \" ).\";\r\n const deleteFix = edit_helper_1.EditHelper.deleteStatement(file, statementNode);\r\n const insertFix = edit_helper_1.EditHelper.insertAt(file, startPosition, insertText);\r\n const finalFix = edit_helper_1.EditHelper.merge(deleteFix, insertFix);\r\n return finalFix;\r\n }\r\n}\r\nexports.AvoidUse = AvoidUse;\r\n//# sourceMappingURL=avoid_use.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/avoid_use.js?");
11284
11295
 
11285
11296
  /***/ }),
11286
11297
 
@@ -11291,7 +11302,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11291
11302
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11292
11303
 
11293
11304
  "use strict";
11294
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BeginEndNames = exports.BeginEndNamesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass BeginEndNamesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.BeginEndNamesConf = BeginEndNamesConf;\r\nclass BeginEndNames extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new BeginEndNamesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"begin_end_names\",\r\n title: \"Check BEGIN END names\",\r\n shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `DATA: BEGIN OF stru,\n field TYPE i,\n END OF structure_not_the_same.`,\r\n goodExample: `DATA: BEGIN OF stru,\n field TYPE i,\n END OF stru.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const output = [];\r\n const struc = file.getStructure();\r\n if (struc === undefined) {\r\n return [];\r\n }\r\n output.push(...this.test(struc, Structures.Data, Statements.DataBegin, Statements.DataEnd, file));\r\n output.push(...this.test(struc, Structures.ClassData, Statements.ClassDataBegin, Statements.ClassDataEnd, file));\r\n output.push(...this.test(struc, Structures.Constants, Statements.ConstantBegin, Statements.ConstantEnd, file));\r\n output.push(...this.test(struc, Structures.Statics, Statements.StaticBegin, Statements.StaticEnd, file));\r\n output.push(...this.test(struc, Structures.TypeEnum, Statements.TypeEnumBegin, Statements.TypeEnumEnd, file));\r\n output.push(...this.test(struc, Structures.Types, Statements.TypeBegin, Statements.TypeEnd, file));\r\n return output;\r\n }\r\n test(stru, type, b, e, file) {\r\n const output = [];\r\n for (const sub of stru.findAllStructuresRecursive(type)) {\r\n let begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (begin === undefined) {\r\n begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (begin === undefined) {\r\n continue;\r\n }\r\n const first = begin.getFirstToken();\r\n let end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (end === undefined) {\r\n end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (end === undefined) {\r\n continue;\r\n }\r\n const last = end.getFirstToken();\r\n if (first.getStr().toUpperCase() !== last.getStr().toUpperCase()) {\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, last.getStart(), last.getEnd(), first.getStr());\r\n const message = \"BEGIN END names must match\";\r\n const issue = issue_1.Issue.atToken(file, first, message, this.getMetadata().key, this.conf.severity, fix);\r\n output.push(issue);\r\n }\r\n if (sub.getChildren().length === 2) {\r\n const message = \"There must be statements between BEGIN and END\";\r\n const issue = issue_1.Issue.atToken(file, first, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.BeginEndNames = BeginEndNames;\r\n//# sourceMappingURL=begin_end_names.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/begin_end_names.js?");
11305
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BeginEndNames = exports.BeginEndNamesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass BeginEndNamesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.BeginEndNamesConf = BeginEndNamesConf;\r\nclass BeginEndNames extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new BeginEndNamesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"begin_end_names\",\r\n title: \"Check BEGIN END names\",\r\n shortDescription: `Check BEGIN OF and END OF names match, plus there must be statements between BEGIN and END`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `DATA: BEGIN OF stru,\r\n field TYPE i,\r\n END OF structure_not_the_same.`,\r\n goodExample: `DATA: BEGIN OF stru,\r\n field TYPE i,\r\n END OF stru.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const output = [];\r\n const struc = file.getStructure();\r\n if (struc === undefined) {\r\n return [];\r\n }\r\n output.push(...this.test(struc, Structures.Data, Statements.DataBegin, Statements.DataEnd, file));\r\n output.push(...this.test(struc, Structures.ClassData, Statements.ClassDataBegin, Statements.ClassDataEnd, file));\r\n output.push(...this.test(struc, Structures.Constants, Statements.ConstantBegin, Statements.ConstantEnd, file));\r\n output.push(...this.test(struc, Structures.Statics, Statements.StaticBegin, Statements.StaticEnd, file));\r\n output.push(...this.test(struc, Structures.TypeEnum, Statements.TypeEnumBegin, Statements.TypeEnumEnd, file));\r\n output.push(...this.test(struc, Structures.Types, Statements.TypeBegin, Statements.TypeEnd, file));\r\n return output;\r\n }\r\n test(stru, type, b, e, file) {\r\n const output = [];\r\n for (const sub of stru.findAllStructuresRecursive(type)) {\r\n let begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (begin === undefined) {\r\n begin = sub.findDirectStatements(b)[0].findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (begin === undefined) {\r\n continue;\r\n }\r\n const first = begin.getFirstToken();\r\n let end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.NamespaceSimpleName);\r\n if (end === undefined) {\r\n end = sub.findDirectStatements(e)[0].findFirstExpression(Expressions.DefinitionName);\r\n }\r\n if (end === undefined) {\r\n continue;\r\n }\r\n const last = end.getFirstToken();\r\n if (first.getStr().toUpperCase() !== last.getStr().toUpperCase()) {\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, last.getStart(), last.getEnd(), first.getStr());\r\n const message = \"BEGIN END names must match\";\r\n const issue = issue_1.Issue.atToken(file, first, message, this.getMetadata().key, this.conf.severity, fix);\r\n output.push(issue);\r\n }\r\n if (sub.getChildren().length === 2) {\r\n const message = \"There must be statements between BEGIN and END\";\r\n const issue = issue_1.Issue.atToken(file, first, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.BeginEndNames = BeginEndNames;\r\n//# sourceMappingURL=begin_end_names.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/begin_end_names.js?");
11295
11306
 
11296
11307
  /***/ }),
11297
11308
 
@@ -11302,7 +11313,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11302
11313
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11303
11314
 
11304
11315
  "use strict";
11305
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BeginSingleInclude = exports.BeginSingleIncludeConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass BeginSingleIncludeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.BeginSingleIncludeConf = BeginSingleIncludeConf;\r\nclass BeginSingleInclude extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new BeginSingleIncludeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"begin_single_include\",\r\n title: \"BEGIN contains single INCLUDE\",\r\n shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `TYPES: BEGIN OF dummy1.\n INCLUDE TYPE dselc.\nTYPES: END OF dummy1.\n\nDATA BEGIN OF foo.\nINCLUDE STRUCTURE syst.\nDATA END OF foo.\n\nSTATICS BEGIN OF bar.\nINCLUDE STRUCTURE syst.\nSTATICS END OF bar.`,\r\n goodExample: `DATA BEGIN OF foo.\nINCLUDE STRUCTURE dselc.\nDATA END OF foo.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const t of stru.findAllStructures(Structures.Types)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"TYPE BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const t of stru.findAllStructures(Structures.Data)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"DATA BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const t of stru.findAllStructures(Structures.Statics)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"STATICS BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.BeginSingleInclude = BeginSingleInclude;\r\n//# sourceMappingURL=begin_single_include.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/begin_single_include.js?");
11316
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.BeginSingleInclude = exports.BeginSingleIncludeConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass BeginSingleIncludeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.BeginSingleIncludeConf = BeginSingleIncludeConf;\r\nclass BeginSingleInclude extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new BeginSingleIncludeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"begin_single_include\",\r\n title: \"BEGIN contains single INCLUDE\",\r\n shortDescription: `Finds TYPE BEGIN with just one INCLUDE TYPE, and DATA with single INCLUDE STRUCTURE`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `TYPES: BEGIN OF dummy1.\r\n INCLUDE TYPE dselc.\r\nTYPES: END OF dummy1.\r\n\r\nDATA BEGIN OF foo.\r\nINCLUDE STRUCTURE syst.\r\nDATA END OF foo.\r\n\r\nSTATICS BEGIN OF bar.\r\nINCLUDE STRUCTURE syst.\r\nSTATICS END OF bar.`,\r\n goodExample: `DATA BEGIN OF foo.\r\nINCLUDE STRUCTURE dselc.\r\nDATA END OF foo.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const t of stru.findAllStructures(Structures.Types)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"TYPE BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const t of stru.findAllStructures(Structures.Data)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"DATA BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const t of stru.findAllStructures(Structures.Statics)) {\r\n if (t.getChildren().length !== 3) {\r\n continue;\r\n }\r\n if (t.findFirstStatement(Statements.IncludeType)) {\r\n const token = t.getFirstToken();\r\n const message = \"STATICS BEGIN with single INCLUDE\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.BeginSingleInclude = BeginSingleInclude;\r\n//# sourceMappingURL=begin_single_include.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/begin_single_include.js?");
11306
11317
 
11307
11318
  /***/ }),
11308
11319
 
@@ -11313,7 +11324,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11313
11324
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11314
11325
 
11315
11326
  "use strict";
11316
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallTransactionAuthorityCheck = exports.CallTransactionAuthorityCheckConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass CallTransactionAuthorityCheckConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CallTransactionAuthorityCheckConf = CallTransactionAuthorityCheckConf;\r\nclass CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CallTransactionAuthorityCheckConf();\r\n this.MINIMUM_VERSION = version_1.Version.v740sp02;\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"call_transaction_authority_check\",\r\n title: \"Call Transaction Authority-Check\",\r\n shortDescription: `Checks that usages of CALL TRANSACTION contain an authority-check.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],\r\n badExample: `CALL TRANSACTION 'FOO'.`,\r\n goodExample: `TRY.\n CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.\n CATCH cx_sy_authorization_error.\nENDTRY.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Add an authority check to CALL TRANSACTION\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const currentVersion = this.reg.getConfig().getVersion();\r\n // Cloud version does not support CALL TRANSACTION\r\n if (currentVersion < this.MINIMUM_VERSION || currentVersion === version_1.Version.Cloud) {\r\n return [];\r\n }\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const statNode of file.getStatements()) {\r\n const statement = statNode.get();\r\n if (statement instanceof Statements.CallTransaction && !statNode.concatTokensWithoutStringsAndComments().toUpperCase().includes(\"WITH AUTHORITY-CHECK\")) {\r\n issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CallTransactionAuthorityCheck = CallTransactionAuthorityCheck;\r\n//# sourceMappingURL=call_transaction_authority_check.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js?");
11327
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallTransactionAuthorityCheck = exports.CallTransactionAuthorityCheckConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass CallTransactionAuthorityCheckConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CallTransactionAuthorityCheckConf = CallTransactionAuthorityCheckConf;\r\nclass CallTransactionAuthorityCheck extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CallTransactionAuthorityCheckConf();\r\n this.MINIMUM_VERSION = version_1.Version.v740sp02;\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"call_transaction_authority_check\",\r\n title: \"Call Transaction Authority-Check\",\r\n shortDescription: `Checks that usages of CALL TRANSACTION contain an authority-check.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/54/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],\r\n badExample: `CALL TRANSACTION 'FOO'.`,\r\n goodExample: `TRY.\r\n CALL TRANSACTION 'FOO' WITH AUTHORITY-CHECK.\r\n CATCH cx_sy_authorization_error.\r\nENDTRY.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Add an authority check to CALL TRANSACTION\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const currentVersion = this.reg.getConfig().getVersion();\r\n // Cloud version does not support CALL TRANSACTION\r\n if (currentVersion < this.MINIMUM_VERSION || currentVersion === version_1.Version.Cloud) {\r\n return [];\r\n }\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const statNode of file.getStatements()) {\r\n const statement = statNode.get();\r\n if (statement instanceof Statements.CallTransaction && !statNode.concatTokensWithoutStringsAndComments().toUpperCase().includes(\"WITH AUTHORITY-CHECK\")) {\r\n issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CallTransactionAuthorityCheck = CallTransactionAuthorityCheck;\r\n//# sourceMappingURL=call_transaction_authority_check.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js?");
11317
11328
 
11318
11329
  /***/ }),
11319
11330
 
@@ -11335,7 +11346,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11335
11346
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11336
11347
 
11337
11348
  "use strict";
11338
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ChainMainlyDeclarations = exports.ChainMainlyDeclarationsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ChainMainlyDeclarationsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allow definition statements to be chained */\r\n this.definitions = true;\r\n /** Allow WRITE statements to be chained */\r\n this.write = true;\r\n /** Allow MOVE statements to be chained */\r\n this.move = true;\r\n /** Allow REFRESH statements to be chained */\r\n this.refresh = true;\r\n /** Allow UNASSIGN statements to be chained */\r\n this.unassign = true;\r\n /** Allow CLEAR statements to be chained */\r\n this.clear = true;\r\n /** Allow HIDE statements to be chained */\r\n this.hide = true;\r\n /** Allow FREE statements to be chained */\r\n this.free = true;\r\n /** Allow INCLUDE statements to be chained */\r\n this.include = true;\r\n /** Allow CHECK statements to be chained */\r\n this.check = true;\r\n /** Allow SORT statements to be chained */\r\n this.sort = true;\r\n }\r\n}\r\nexports.ChainMainlyDeclarationsConf = ChainMainlyDeclarationsConf;\r\nclass ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ChainMainlyDeclarationsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"chain_mainly_declarations\",\r\n title: \"Chain mainly declarations\",\r\n shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,\r\n extendedInformation: `\nhttps://docs.abapopenchecks.org/checks/23/\n\nhttps://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm\n`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `CALL METHOD: bar.`,\r\n goodExample: `CALL METHOD bar.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n let previousRow;\r\n for (const statementNode of structure.findAllStatementNodes()) {\r\n const colon = statementNode.getColon();\r\n if (colon === undefined) {\r\n continue;\r\n }\r\n const statement = statementNode.get();\r\n if (this.conf.definitions === true\r\n && (statement instanceof Statements.ClassData\r\n || statement instanceof Statements.ClassDataBegin\r\n || statement instanceof Statements.ClassDataEnd\r\n || statement instanceof Statements.Static\r\n || statement instanceof Statements.StaticBegin\r\n || statement instanceof Statements.StaticEnd\r\n || statement instanceof Statements.Local\r\n || statement instanceof Statements.Constant\r\n || statement instanceof Statements.ConstantBegin\r\n || statement instanceof Statements.ConstantEnd\r\n || statement instanceof Statements.Controls\r\n || statement instanceof Statements.Parameter\r\n || statement instanceof Statements.SelectOption\r\n || statement instanceof Statements.SelectionScreen\r\n || statement instanceof Statements.Aliases\r\n || statement instanceof Statements.Tables\r\n || statement instanceof Statements.MethodDef\r\n || statement instanceof Statements.InterfaceDef\r\n || statement instanceof Statements.Type\r\n || statement instanceof Statements.TypeBegin\r\n || statement instanceof Statements.TypeEnd\r\n || statement instanceof Statements.TypeEnumBegin\r\n || statement instanceof Statements.TypeEnumEnd\r\n || statement instanceof Statements.TypeEnum\r\n || statement instanceof Statements.Events\r\n || statement instanceof Statements.Ranges\r\n || statement instanceof Statements.TypePools\r\n || statement instanceof Statements.FieldSymbol\r\n || statement instanceof Statements.Data\r\n || statement instanceof Statements.DataBegin\r\n || statement instanceof Statements.DataEnd)) {\r\n continue;\r\n }\r\n else if (this.conf.write === true && statement instanceof Statements.Write) {\r\n continue;\r\n }\r\n else if (this.conf.move === true && statement instanceof Statements.Move) {\r\n continue;\r\n }\r\n else if (this.conf.refresh === true && statement instanceof Statements.Refresh) {\r\n continue;\r\n }\r\n else if (this.conf.unassign === true && statement instanceof Statements.Unassign) {\r\n continue;\r\n }\r\n else if (this.conf.clear === true && statement instanceof Statements.Clear) {\r\n continue;\r\n }\r\n else if (this.conf.hide === true && statement instanceof Statements.Hide) {\r\n continue;\r\n }\r\n else if (this.conf.free === true && statement instanceof Statements.Free) {\r\n continue;\r\n }\r\n else if (this.conf.include === true && statement instanceof Statements.Include) {\r\n continue;\r\n }\r\n else if (this.conf.check === true && statement instanceof Statements.Check) {\r\n continue;\r\n }\r\n else if (this.conf.sort === true && statement instanceof Statements.Sort) {\r\n continue;\r\n }\r\n let prevFix;\r\n if (previousRow === colon.getStart().getRow()) {\r\n prevFix = (_a = issues.pop()) === null || _a === void 0 ? void 0 : _a.getFix();\r\n }\r\n const fix = this.getFix(file, statement, statementNode, prevFix);\r\n const message = \"Chain mainly declarations\";\r\n issues.push(issue_1.Issue.atToken(file, statementNode.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));\r\n previousRow = statementNode.getColon().getStart().getRow();\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, statementNode, prevFix) {\r\n if (statement instanceof Statements.ClassDataBegin ||\r\n statement instanceof Statements.ClassDataEnd ||\r\n statement instanceof Statements.StaticBegin ||\r\n statement instanceof Statements.StaticEnd ||\r\n statement instanceof Statements.ConstantBegin ||\r\n statement instanceof Statements.ConstantEnd ||\r\n statement instanceof Statements.TypeBegin ||\r\n statement instanceof Statements.TypeEnd ||\r\n statement instanceof Statements.TypeEnumBegin ||\r\n statement instanceof Statements.TypeEnumEnd ||\r\n statement instanceof Statements.DataBegin ||\r\n statement instanceof Statements.DataEnd) {\r\n return undefined;\r\n }\r\n let replacement = statementNode.concatTokens();\r\n replacement = replacement.replace(\",\", \".\");\r\n let start;\r\n if (prevFix === undefined) {\r\n start = statementNode.getStart();\r\n }\r\n else {\r\n start = statementNode.getTokens()[1].getStart();\r\n }\r\n let fix = edit_helper_1.EditHelper.replaceRange(file, start, statementNode.getEnd(), replacement);\r\n if (prevFix !== undefined) {\r\n fix = edit_helper_1.EditHelper.merge(fix, prevFix);\r\n }\r\n return fix;\r\n }\r\n}\r\nexports.ChainMainlyDeclarations = ChainMainlyDeclarations;\r\n//# sourceMappingURL=chain_mainly_declarations.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js?");
11349
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ChainMainlyDeclarations = exports.ChainMainlyDeclarationsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ChainMainlyDeclarationsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allow definition statements to be chained */\r\n this.definitions = true;\r\n /** Allow WRITE statements to be chained */\r\n this.write = true;\r\n /** Allow MOVE statements to be chained */\r\n this.move = true;\r\n /** Allow REFRESH statements to be chained */\r\n this.refresh = true;\r\n /** Allow UNASSIGN statements to be chained */\r\n this.unassign = true;\r\n /** Allow CLEAR statements to be chained */\r\n this.clear = true;\r\n /** Allow HIDE statements to be chained */\r\n this.hide = true;\r\n /** Allow FREE statements to be chained */\r\n this.free = true;\r\n /** Allow INCLUDE statements to be chained */\r\n this.include = true;\r\n /** Allow CHECK statements to be chained */\r\n this.check = true;\r\n /** Allow SORT statements to be chained */\r\n this.sort = true;\r\n }\r\n}\r\nexports.ChainMainlyDeclarationsConf = ChainMainlyDeclarationsConf;\r\nclass ChainMainlyDeclarations extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ChainMainlyDeclarationsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"chain_mainly_declarations\",\r\n title: \"Chain mainly declarations\",\r\n shortDescription: `Chain mainly declarations, allows chaining for the configured statements, reports errors for other statements.`,\r\n extendedInformation: `\r\nhttps://docs.abapopenchecks.org/checks/23/\r\n\r\nhttps://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenchained_statements_guidl.htm\r\n`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `CALL METHOD: bar.`,\r\n goodExample: `CALL METHOD bar.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n let previousRow;\r\n for (const statementNode of structure.findAllStatementNodes()) {\r\n const colon = statementNode.getColon();\r\n if (colon === undefined) {\r\n continue;\r\n }\r\n const statement = statementNode.get();\r\n if (this.conf.definitions === true\r\n && (statement instanceof Statements.ClassData\r\n || statement instanceof Statements.ClassDataBegin\r\n || statement instanceof Statements.ClassDataEnd\r\n || statement instanceof Statements.Static\r\n || statement instanceof Statements.StaticBegin\r\n || statement instanceof Statements.StaticEnd\r\n || statement instanceof Statements.Local\r\n || statement instanceof Statements.Constant\r\n || statement instanceof Statements.ConstantBegin\r\n || statement instanceof Statements.ConstantEnd\r\n || statement instanceof Statements.Controls\r\n || statement instanceof Statements.Parameter\r\n || statement instanceof Statements.SelectOption\r\n || statement instanceof Statements.SelectionScreen\r\n || statement instanceof Statements.Aliases\r\n || statement instanceof Statements.Tables\r\n || statement instanceof Statements.MethodDef\r\n || statement instanceof Statements.InterfaceDef\r\n || statement instanceof Statements.Type\r\n || statement instanceof Statements.TypeBegin\r\n || statement instanceof Statements.TypeEnd\r\n || statement instanceof Statements.TypeEnumBegin\r\n || statement instanceof Statements.TypeEnumEnd\r\n || statement instanceof Statements.TypeEnum\r\n || statement instanceof Statements.Events\r\n || statement instanceof Statements.Ranges\r\n || statement instanceof Statements.TypePools\r\n || statement instanceof Statements.FieldSymbol\r\n || statement instanceof Statements.Data\r\n || statement instanceof Statements.DataBegin\r\n || statement instanceof Statements.DataEnd)) {\r\n continue;\r\n }\r\n else if (this.conf.write === true && statement instanceof Statements.Write) {\r\n continue;\r\n }\r\n else if (this.conf.move === true && statement instanceof Statements.Move) {\r\n continue;\r\n }\r\n else if (this.conf.refresh === true && statement instanceof Statements.Refresh) {\r\n continue;\r\n }\r\n else if (this.conf.unassign === true && statement instanceof Statements.Unassign) {\r\n continue;\r\n }\r\n else if (this.conf.clear === true && statement instanceof Statements.Clear) {\r\n continue;\r\n }\r\n else if (this.conf.hide === true && statement instanceof Statements.Hide) {\r\n continue;\r\n }\r\n else if (this.conf.free === true && statement instanceof Statements.Free) {\r\n continue;\r\n }\r\n else if (this.conf.include === true && statement instanceof Statements.Include) {\r\n continue;\r\n }\r\n else if (this.conf.check === true && statement instanceof Statements.Check) {\r\n continue;\r\n }\r\n else if (this.conf.sort === true && statement instanceof Statements.Sort) {\r\n continue;\r\n }\r\n let prevFix;\r\n if (previousRow === colon.getStart().getRow()) {\r\n prevFix = (_a = issues.pop()) === null || _a === void 0 ? void 0 : _a.getFix();\r\n }\r\n const fix = this.getFix(file, statement, statementNode, prevFix);\r\n const message = \"Chain mainly declarations\";\r\n issues.push(issue_1.Issue.atToken(file, statementNode.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));\r\n previousRow = statementNode.getColon().getStart().getRow();\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, statementNode, prevFix) {\r\n if (statement instanceof Statements.ClassDataBegin ||\r\n statement instanceof Statements.ClassDataEnd ||\r\n statement instanceof Statements.StaticBegin ||\r\n statement instanceof Statements.StaticEnd ||\r\n statement instanceof Statements.ConstantBegin ||\r\n statement instanceof Statements.ConstantEnd ||\r\n statement instanceof Statements.TypeBegin ||\r\n statement instanceof Statements.TypeEnd ||\r\n statement instanceof Statements.TypeEnumBegin ||\r\n statement instanceof Statements.TypeEnumEnd ||\r\n statement instanceof Statements.DataBegin ||\r\n statement instanceof Statements.DataEnd) {\r\n return undefined;\r\n }\r\n let replacement = statementNode.concatTokens();\r\n replacement = replacement.replace(\",\", \".\");\r\n let start;\r\n if (prevFix === undefined) {\r\n start = statementNode.getStart();\r\n }\r\n else {\r\n start = statementNode.getTokens()[1].getStart();\r\n }\r\n let fix = edit_helper_1.EditHelper.replaceRange(file, start, statementNode.getEnd(), replacement);\r\n if (prevFix !== undefined) {\r\n fix = edit_helper_1.EditHelper.merge(fix, prevFix);\r\n }\r\n return fix;\r\n }\r\n}\r\nexports.ChainMainlyDeclarations = ChainMainlyDeclarations;\r\n//# sourceMappingURL=chain_mainly_declarations.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js?");
11339
11350
 
11340
11351
  /***/ }),
11341
11352
 
@@ -11346,7 +11357,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11346
11357
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11347
11358
 
11348
11359
  "use strict";
11349
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckAbstract = exports.CheckAbstractConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckAbstractConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckAbstractConf = CheckAbstractConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n /** Abstract method defined in non-abstract class */\r\n IssueType[IssueType[\"NotAbstractClass\"] = 0] = \"NotAbstractClass\";\r\n IssueType[IssueType[\"AbstractAndFinal\"] = 1] = \"AbstractAndFinal\";\r\n})(IssueType || (IssueType = {}));\r\nclass CheckAbstract extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckAbstractConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_abstract\",\r\n title: \"Check abstract methods and classes\",\r\n shortDescription: `Checks abstract methods and classes:\n- class defined as abstract and final,\n- non-abstract class contains abstract methods`,\r\n extendedInformation: `If a class defines only constants, use an interface instead`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType, name) {\r\n switch (issueType) {\r\n case IssueType.AbstractAndFinal:\r\n return \"Classes should not be ABSTRACT and FINAL: \" + name;\r\n case IssueType.NotAbstractClass:\r\n return \"Abstract methods require abstract classes: \" + name;\r\n default:\r\n return \"\";\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n if (classDef.isAbstract === true) {\r\n if (classDef.isFinal === true && classDef.isForTesting === false) {\r\n issues.push(issue_1.Issue.atIdentifier(classDef.identifier, this.getDescription(IssueType.AbstractAndFinal, classDef.name), this.getMetadata().key, this.conf.severity));\r\n }\r\n continue;\r\n }\r\n for (const methodDef of classDef.methods) {\r\n if (methodDef.isAbstract === true) {\r\n issues.push(issue_1.Issue.atIdentifier(methodDef.identifier, this.getDescription(IssueType.NotAbstractClass, methodDef.name), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CheckAbstract = CheckAbstract;\r\n//# sourceMappingURL=check_abstract.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_abstract.js?");
11360
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckAbstract = exports.CheckAbstractConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckAbstractConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckAbstractConf = CheckAbstractConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n /** Abstract method defined in non-abstract class */\r\n IssueType[IssueType[\"NotAbstractClass\"] = 0] = \"NotAbstractClass\";\r\n IssueType[IssueType[\"AbstractAndFinal\"] = 1] = \"AbstractAndFinal\";\r\n})(IssueType || (IssueType = {}));\r\nclass CheckAbstract extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckAbstractConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_abstract\",\r\n title: \"Check abstract methods and classes\",\r\n shortDescription: `Checks abstract methods and classes:\r\n- class defined as abstract and final,\r\n- non-abstract class contains abstract methods`,\r\n extendedInformation: `If a class defines only constants, use an interface instead`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType, name) {\r\n switch (issueType) {\r\n case IssueType.AbstractAndFinal:\r\n return \"Classes should not be ABSTRACT and FINAL: \" + name;\r\n case IssueType.NotAbstractClass:\r\n return \"Abstract methods require abstract classes: \" + name;\r\n default:\r\n return \"\";\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n if (classDef.isAbstract === true) {\r\n if (classDef.isFinal === true && classDef.isForTesting === false) {\r\n issues.push(issue_1.Issue.atIdentifier(classDef.identifier, this.getDescription(IssueType.AbstractAndFinal, classDef.name), this.getMetadata().key, this.conf.severity));\r\n }\r\n continue;\r\n }\r\n for (const methodDef of classDef.methods) {\r\n if (methodDef.isAbstract === true) {\r\n issues.push(issue_1.Issue.atIdentifier(methodDef.identifier, this.getDescription(IssueType.NotAbstractClass, methodDef.name), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CheckAbstract = CheckAbstract;\r\n//# sourceMappingURL=check_abstract.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_abstract.js?");
11350
11361
 
11351
11362
  /***/ }),
11352
11363
 
@@ -11357,7 +11368,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11357
11368
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11358
11369
 
11359
11370
  "use strict";
11360
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckComments = exports.CheckCommentsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckCommentsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows the use of end-of-line comments. */\r\n this.allowEndOfLine = false;\r\n }\r\n}\r\nexports.CheckCommentsConf = CheckCommentsConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n IssueType[IssueType[\"EndOfLine\"] = 0] = \"EndOfLine\";\r\n})(IssueType || (IssueType = {}));\r\nclass CheckComments extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckCommentsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_comments\",\r\n title: \"Check Comments\",\r\n shortDescription: `\nVarious checks for comment usage.`,\r\n extendedInformation: `\n* End of line comments. Comments starting with \"#EC\" or \"##\" are ignored\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType) {\r\n switch (issueType) {\r\n case IssueType.EndOfLine: return `Do not use end of line comments - move comment to previous row instead`;\r\n default: return \"\";\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const rows = file.getRawRows();\r\n if (this.conf.allowEndOfLine === true) {\r\n return [];\r\n }\r\n const commentRows = [];\r\n for (let i = 0; i < rows.length; i++) {\r\n const row = rows[i];\r\n if (row.trim().startsWith(\"*\") || row.trim().startsWith(`\"`)) {\r\n commentRows.push(i);\r\n }\r\n }\r\n const statements = file.getStatements();\r\n for (let i = statements.length - 1; i >= 0; i--) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof _statement_1.Comment && !commentRows.includes(statement.getStart().getRow() - 1)) {\r\n if (statement.getFirstToken().getStr().startsWith(`\"#EC`)\r\n || statement.getFirstToken().getStr().startsWith(`\"##`)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, statement, this.getDescription(IssueType.EndOfLine), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CheckComments = CheckComments;\r\n//# sourceMappingURL=check_comments.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_comments.js?");
11371
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckComments = exports.CheckCommentsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckCommentsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows the use of end-of-line comments. */\r\n this.allowEndOfLine = false;\r\n }\r\n}\r\nexports.CheckCommentsConf = CheckCommentsConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n IssueType[IssueType[\"EndOfLine\"] = 0] = \"EndOfLine\";\r\n})(IssueType || (IssueType = {}));\r\nclass CheckComments extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckCommentsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_comments\",\r\n title: \"Check Comments\",\r\n shortDescription: `\r\nVarious checks for comment usage.`,\r\n extendedInformation: `\r\n* End of line comments. Comments starting with \"#EC\" or \"##\" are ignored\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#put-comments-before-the-statement-they-relate-to`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType) {\r\n switch (issueType) {\r\n case IssueType.EndOfLine: return `Do not use end of line comments - move comment to previous row instead`;\r\n default: return \"\";\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const rows = file.getRawRows();\r\n if (this.conf.allowEndOfLine === true) {\r\n return [];\r\n }\r\n const commentRows = [];\r\n for (let i = 0; i < rows.length; i++) {\r\n const row = rows[i];\r\n if (row.trim().startsWith(\"*\") || row.trim().startsWith(`\"`)) {\r\n commentRows.push(i);\r\n }\r\n }\r\n const statements = file.getStatements();\r\n for (let i = statements.length - 1; i >= 0; i--) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof _statement_1.Comment && !commentRows.includes(statement.getStart().getRow() - 1)) {\r\n if (statement.getFirstToken().getStr().startsWith(`\"#EC`)\r\n || statement.getFirstToken().getStr().startsWith(`\"##`)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, statement, this.getDescription(IssueType.EndOfLine), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.CheckComments = CheckComments;\r\n//# sourceMappingURL=check_comments.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_comments.js?");
11361
11372
 
11362
11373
  /***/ }),
11363
11374
 
@@ -11379,7 +11390,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11379
11390
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11380
11391
 
11381
11392
  "use strict";
11382
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckInclude = exports.CheckIncludeConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckIncludeConf = CheckIncludeConf;\r\nclass CheckInclude {\r\n constructor() {\r\n this.conf = new CheckIncludeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_include\",\r\n title: \"Check INCLUDEs\",\r\n shortDescription: `Checks INCLUDE statements`,\r\n extendedInformation: `\n* Reports unused includes\n* Errors if the includes are not found\n* Error if including a main program`,\r\n tags: [_irule_1.RuleTag.Syntax],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n this.graph = new include_graph_1.IncludeGraph(this.reg);\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n let ret = [];\r\n for (const file of obj.getABAPFiles()) {\r\n ret = ret.concat(this.graph.getIssuesFile(file));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.CheckInclude = CheckInclude;\r\n//# sourceMappingURL=check_include.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_include.js?");
11393
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckInclude = exports.CheckIncludeConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ \"./node_modules/@abaplint/core/build/src/utils/include_graph.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckIncludeConf = CheckIncludeConf;\r\nclass CheckInclude {\r\n constructor() {\r\n this.conf = new CheckIncludeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_include\",\r\n title: \"Check INCLUDEs\",\r\n shortDescription: `Checks INCLUDE statements`,\r\n extendedInformation: `\r\n* Reports unused includes\r\n* Errors if the includes are not found\r\n* Error if including a main program`,\r\n tags: [_irule_1.RuleTag.Syntax],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n this.graph = new include_graph_1.IncludeGraph(this.reg);\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n let ret = [];\r\n for (const file of obj.getABAPFiles()) {\r\n ret = ret.concat(this.graph.getIssuesFile(file));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.CheckInclude = CheckInclude;\r\n//# sourceMappingURL=check_include.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_include.js?");
11383
11394
 
11384
11395
  /***/ }),
11385
11396
 
@@ -11390,7 +11401,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11390
11401
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11391
11402
 
11392
11403
  "use strict";
11393
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckNoHandlerPragma = exports.CheckNoHandlerPragmaConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckNoHandlerPragmaConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckNoHandlerPragmaConf = CheckNoHandlerPragmaConf;\r\nclass CheckNoHandlerPragma extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckNoHandlerPragmaConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_no_handler_pragma\",\r\n title: \"Check if NO_HANDLER can be removed\",\r\n shortDescription: `Checks NO_HANDLER pragmas that can be removed`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `TRY.\n ...\n CATCH zcx_abapgit_exception ##NO_HANDLER.\n RETURN. \" it has a handler\nENDTRY.`,\r\n goodExample: `TRY.\n ...\n CATCH zcx_abapgit_exception.\n RETURN.\nENDTRY.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let noHandler = false;\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof Statements.EndTry) {\r\n noHandler = false;\r\n }\r\n else if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (noHandler === true && !(statement.get() instanceof Statements.Catch)) {\r\n const message = \"NO_HANDLER pragma or pseudo comment can be removed\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n noHandler = false;\r\n }\r\n else {\r\n noHandler = this.containsNoHandler(statement, statements[i + 1]);\r\n }\r\n }\r\n return issues;\r\n }\r\n containsNoHandler(statement, next) {\r\n for (const t of statement.getPragmas()) {\r\n if (t.getStr().toUpperCase() === \"##NO_HANDLER\") {\r\n return true;\r\n }\r\n }\r\n if (next\r\n && next.get() instanceof _statement_1.Comment\r\n && next.concatTokens().toUpperCase().includes(\"#EC NO_HANDLER\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nexports.CheckNoHandlerPragma = CheckNoHandlerPragma;\r\n//# sourceMappingURL=check_no_handler_pragma.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_no_handler_pragma.js?");
11404
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckNoHandlerPragma = exports.CheckNoHandlerPragmaConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass CheckNoHandlerPragmaConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.CheckNoHandlerPragmaConf = CheckNoHandlerPragmaConf;\r\nclass CheckNoHandlerPragma extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckNoHandlerPragmaConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_no_handler_pragma\",\r\n title: \"Check if NO_HANDLER can be removed\",\r\n shortDescription: `Checks NO_HANDLER pragmas that can be removed`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `TRY.\r\n ...\r\n CATCH zcx_abapgit_exception ##NO_HANDLER.\r\n RETURN. \" it has a handler\r\nENDTRY.`,\r\n goodExample: `TRY.\r\n ...\r\n CATCH zcx_abapgit_exception.\r\n RETURN.\r\nENDTRY.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let noHandler = false;\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof Statements.EndTry) {\r\n noHandler = false;\r\n }\r\n else if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (noHandler === true && !(statement.get() instanceof Statements.Catch)) {\r\n const message = \"NO_HANDLER pragma or pseudo comment can be removed\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n noHandler = false;\r\n }\r\n else {\r\n noHandler = this.containsNoHandler(statement, statements[i + 1]);\r\n }\r\n }\r\n return issues;\r\n }\r\n containsNoHandler(statement, next) {\r\n for (const t of statement.getPragmas()) {\r\n if (t.getStr().toUpperCase() === \"##NO_HANDLER\") {\r\n return true;\r\n }\r\n }\r\n if (next\r\n && next.get() instanceof _statement_1.Comment\r\n && next.concatTokens().toUpperCase().includes(\"#EC NO_HANDLER\")) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\nexports.CheckNoHandlerPragma = CheckNoHandlerPragma;\r\n//# sourceMappingURL=check_no_handler_pragma.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_no_handler_pragma.js?");
11394
11405
 
11395
11406
  /***/ }),
11396
11407
 
@@ -11401,7 +11412,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11401
11412
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11402
11413
 
11403
11414
  "use strict";
11404
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckSubrc = exports.CheckSubrcConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass CheckSubrcConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.openDataset = true;\r\n this.authorityCheck = true;\r\n this.selectSingle = true;\r\n this.selectTable = true;\r\n this.updateDatabase = true;\r\n this.insertDatabase = true;\r\n this.modifyDatabase = true;\r\n this.readTable = true;\r\n this.assign = true;\r\n this.find = true;\r\n }\r\n}\r\nexports.CheckSubrcConf = CheckSubrcConf;\r\nclass CheckSubrc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckSubrcConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_subrc\",\r\n title: \"Check sy-subrc\",\r\n shortDescription: `Check sy-subrc`,\r\n extendedInformation: `Pseudo comment \"#EC CI_SUBRC can be added to suppress findings\n\nIf sy-dbcnt is checked after database statements, it is considered okay.\n\n\"SELECT SINGLE @abap_true FROM \" is considered as an existence check\n\nIf IS ASSIGNED is checked after assigning, it is considered okay.\n\nFIND statement with MATCH COUNT is considered okay if subrc is not checked`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n pseudoComment: \"EC CI_SUBRC\",\r\n pragma: \"##SUBRC_OK\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const statements = file.getStatements();\r\n const message = \"Check sy-subrc\";\r\n const config = this.getConfig();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n // todo: CALL FUNCTION\r\n if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {\r\n continue;\r\n }\r\n if (config.openDataset === true\r\n && statement.get() instanceof Statements.OpenDataset\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.authorityCheck === true\r\n && statement.get() instanceof Statements.AuthorityCheck\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.selectSingle === true\r\n && statement.get() instanceof Statements.Select\r\n && statement.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \")\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.startsWith(\"SELECT SINGLE @ABAP_TRUE FROM \")) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.selectTable === true\r\n && statement.get() instanceof Statements.Select\r\n && statement.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \") === false\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.updateDatabase === true\r\n && statement.get() instanceof Statements.UpdateDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.insertDatabase === true\r\n && statement.get() instanceof Statements.InsertDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.modifyDatabase === true\r\n && statement.get() instanceof Statements.ModifyDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.readTable === true\r\n && statement.get() instanceof Statements.ReadTable\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.assign === true\r\n && statement.get() instanceof Statements.Assign\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.find === true\r\n && statement.get() instanceof Statements.Find\r\n && this.isExemptedFind(statement) === false\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n isExemptedFind(s) {\r\n // see https://github.com/abaplint/abaplint/issues/2130\r\n return s.concatTokens().toUpperCase().includes(\" MATCH COUNT \") === true;\r\n }\r\n checksDbcnt(index, statements) {\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.get() instanceof Statements.EndIf) {\r\n continue;\r\n }\r\n else {\r\n return concat.includes(\"SY-DBCNT\");\r\n }\r\n }\r\n return false;\r\n }\r\n isChecked(index, statements) {\r\n var _a, _b;\r\n let assigned = undefined;\r\n let assignedn = undefined;\r\n if (statements[index].get() instanceof Statements.Assign\r\n || statements[index].get() instanceof Statements.ReadTable) {\r\n const fs = (_b = (_a = statements[index].findFirstExpression(Expressions.FSTarget)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.FieldSymbol)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n assigned = (fs === null || fs === void 0 ? void 0 : fs.toUpperCase()) + \" IS ASSIGNED\";\r\n assignedn = (fs === null || fs === void 0 ? void 0 : fs.toUpperCase()) + \" IS NOT ASSIGNED\";\r\n }\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n if (concat.includes(\"\" + this.getMetadata().pseudoComment)) {\r\n return true;\r\n }\r\n }\r\n else if (statement.get() instanceof Statements.EndIf) {\r\n continue;\r\n }\r\n else {\r\n if (assigned && concat.includes(assigned)) {\r\n return true;\r\n }\r\n if (assignedn && concat.includes(assignedn)) {\r\n return true;\r\n }\r\n return concat.includes(\" SY-SUBRC\")\r\n || concat.includes(\"CL_ABAP_UNIT_ASSERT=>ASSERT_SUBRC\");\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.CheckSubrc = CheckSubrc;\r\n//# sourceMappingURL=check_subrc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_subrc.js?");
11415
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CheckSubrc = exports.CheckSubrcConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass CheckSubrcConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.openDataset = true;\r\n this.authorityCheck = true;\r\n this.selectSingle = true;\r\n this.selectTable = true;\r\n this.updateDatabase = true;\r\n this.insertDatabase = true;\r\n this.modifyDatabase = true;\r\n this.readTable = true;\r\n this.assign = true;\r\n this.find = true;\r\n }\r\n}\r\nexports.CheckSubrcConf = CheckSubrcConf;\r\nclass CheckSubrc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CheckSubrcConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"check_subrc\",\r\n title: \"Check sy-subrc\",\r\n shortDescription: `Check sy-subrc`,\r\n extendedInformation: `Pseudo comment \"#EC CI_SUBRC can be added to suppress findings\r\n\r\nIf sy-dbcnt is checked after database statements, it is considered okay.\r\n\r\n\"SELECT SINGLE @abap_true FROM \" is considered as an existence check\r\n\r\nIf IS ASSIGNED is checked after assigning, it is considered okay.\r\n\r\nFIND statement with MATCH COUNT is considered okay if subrc is not checked`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n pseudoComment: \"EC CI_SUBRC\",\r\n pragma: \"##SUBRC_OK\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const statements = file.getStatements();\r\n const message = \"Check sy-subrc\";\r\n const config = this.getConfig();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n // todo: CALL FUNCTION\r\n if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {\r\n continue;\r\n }\r\n if (config.openDataset === true\r\n && statement.get() instanceof Statements.OpenDataset\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.authorityCheck === true\r\n && statement.get() instanceof Statements.AuthorityCheck\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.selectSingle === true\r\n && statement.get() instanceof Statements.Select\r\n && statement.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \")\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.startsWith(\"SELECT SINGLE @ABAP_TRUE FROM \")) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.selectTable === true\r\n && statement.get() instanceof Statements.Select\r\n && statement.concatTokens().toUpperCase().startsWith(\"SELECT SINGLE \") === false\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.updateDatabase === true\r\n && statement.get() instanceof Statements.UpdateDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.insertDatabase === true\r\n && statement.get() instanceof Statements.InsertDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.modifyDatabase === true\r\n && statement.get() instanceof Statements.ModifyDatabase\r\n && this.isChecked(i, statements) === false\r\n && this.checksDbcnt(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.readTable === true\r\n && statement.get() instanceof Statements.ReadTable\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.assign === true\r\n && statement.get() instanceof Statements.Assign\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n else if (config.find === true\r\n && statement.get() instanceof Statements.Find\r\n && this.isExemptedFind(statement) === false\r\n && this.isChecked(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n isExemptedFind(s) {\r\n // see https://github.com/abaplint/abaplint/issues/2130\r\n return s.concatTokens().toUpperCase().includes(\" MATCH COUNT \") === true;\r\n }\r\n checksDbcnt(index, statements) {\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.get() instanceof Statements.EndIf) {\r\n continue;\r\n }\r\n else {\r\n return concat.includes(\"SY-DBCNT\");\r\n }\r\n }\r\n return false;\r\n }\r\n isChecked(index, statements) {\r\n var _a, _b;\r\n let assigned = undefined;\r\n let assignedn = undefined;\r\n if (statements[index].get() instanceof Statements.Assign\r\n || statements[index].get() instanceof Statements.ReadTable) {\r\n const fs = (_b = (_a = statements[index].findFirstExpression(Expressions.FSTarget)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.FieldSymbol)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n assigned = (fs === null || fs === void 0 ? void 0 : fs.toUpperCase()) + \" IS ASSIGNED\";\r\n assignedn = (fs === null || fs === void 0 ? void 0 : fs.toUpperCase()) + \" IS NOT ASSIGNED\";\r\n }\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n if (concat.includes(\"\" + this.getMetadata().pseudoComment)) {\r\n return true;\r\n }\r\n }\r\n else if (statement.get() instanceof Statements.EndIf) {\r\n continue;\r\n }\r\n else {\r\n if (assigned && concat.includes(assigned)) {\r\n return true;\r\n }\r\n if (assignedn && concat.includes(assignedn)) {\r\n return true;\r\n }\r\n return concat.includes(\" SY-SUBRC\")\r\n || concat.includes(\"CL_ABAP_UNIT_ASSERT=>ASSERT_SUBRC\");\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.CheckSubrc = CheckSubrc;\r\n//# sourceMappingURL=check_subrc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/check_subrc.js?");
11405
11416
 
11406
11417
  /***/ }),
11407
11418
 
@@ -11478,7 +11489,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11478
11489
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11479
11490
 
11480
11491
  "use strict";
11481
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CommentedCode = exports.CommentedCodeConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst abap_parser_1 = __webpack_require__(/*! ../abap/abap_parser */ \"./node_modules/@abaplint/core/build/src/abap/abap_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst memory_file_1 = __webpack_require__(/*! ../files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nclass CommentedCodeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allow INCLUDEs in function groups */\r\n this.allowIncludeInFugr = true;\r\n }\r\n}\r\nexports.CommentedCodeConf = CommentedCodeConf;\r\nclass CommentedCode extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CommentedCodeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"commented_code\",\r\n title: \"Find commented code\",\r\n shortDescription: `Detects usage of commented out code.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it\nhttps://docs.abapopenchecks.org/checks/14/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Commented code\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n let issues = [];\r\n const rows = file.getRawRows();\r\n let code = \"\";\r\n let posEnd = undefined;\r\n let posStart = undefined;\r\n for (let i = 0; i < rows.length; i++) {\r\n if (this.isCommentLine(rows[i])) {\r\n if (code === \"\") {\r\n posStart = new position_1.Position(i + 1, 1);\r\n }\r\n code = code + rows[i].trim().substr(1) + \"\\n\";\r\n posEnd = new position_1.Position(i + 1, rows[i].length + 1);\r\n }\r\n else if (code !== \"\" && posStart && posEnd) {\r\n issues = issues.concat(this.check(code.trim(), file, posStart, posEnd, obj));\r\n code = \"\";\r\n }\r\n }\r\n if (posStart && posEnd) {\r\n issues = issues.concat(this.check(code.trim(), file, posStart, posEnd, obj));\r\n }\r\n return issues;\r\n }\r\n check(code, file, posStart, posEnd, obj) {\r\n // assumption: code must end with \".\" in order to be valid ABAP\r\n if (code === \"\" || code.charAt(code.length - 1) !== \".\") {\r\n return [];\r\n }\r\n const commented = new memory_file_1.MemoryFile(\"_foobar.prog.abap\", code);\r\n const abapFile = new abap_parser_1.ABAPParser().parse([commented]).output[0];\r\n const statementNodes = abapFile.getStatements();\r\n if (statementNodes.length === 0) {\r\n return [];\r\n }\r\n let containsStatement = false;\r\n for (const statementNode of statementNodes) {\r\n const statement = statementNode.get();\r\n if (this.getConfig().allowIncludeInFugr === true\r\n && obj instanceof objects_1.FunctionGroup\r\n && statement instanceof statements_1.Include) {\r\n continue;\r\n }\r\n if (!(statement instanceof _statement_1.Unknown\r\n || statement instanceof _statement_1.Empty\r\n || statement instanceof _statement_1.Comment)) {\r\n containsStatement = true;\r\n break;\r\n }\r\n }\r\n if (!containsStatement) {\r\n return [];\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, posStart, posEnd);\r\n const issue = issue_1.Issue.atRange(file, posStart, posEnd, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n return [issue];\r\n }\r\n isCommentLine(text) {\r\n return (text.substr(0, 1) === \"*\")\r\n || (text.trim().substr(0, 1) === \"\\\"\" && text.trim().substr(1, 1) !== \"!\");\r\n }\r\n}\r\nexports.CommentedCode = CommentedCode;\r\n//# sourceMappingURL=commented_code.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/commented_code.js?");
11492
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CommentedCode = exports.CommentedCodeConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst abap_parser_1 = __webpack_require__(/*! ../abap/abap_parser */ \"./node_modules/@abaplint/core/build/src/abap/abap_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst memory_file_1 = __webpack_require__(/*! ../files/memory_file */ \"./node_modules/@abaplint/core/build/src/files/memory_file.js\");\r\nclass CommentedCodeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allow INCLUDEs in function groups */\r\n this.allowIncludeInFugr = true;\r\n }\r\n}\r\nexports.CommentedCodeConf = CommentedCodeConf;\r\nclass CommentedCode extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new CommentedCodeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"commented_code\",\r\n title: \"Find commented code\",\r\n shortDescription: `Detects usage of commented out code.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#delete-code-instead-of-commenting-it\r\nhttps://docs.abapopenchecks.org/checks/14/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Commented code\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n let issues = [];\r\n const rows = file.getRawRows();\r\n let code = \"\";\r\n let posEnd = undefined;\r\n let posStart = undefined;\r\n for (let i = 0; i < rows.length; i++) {\r\n if (this.isCommentLine(rows[i])) {\r\n if (code === \"\") {\r\n posStart = new position_1.Position(i + 1, 1);\r\n }\r\n code = code + rows[i].trim().substr(1) + \"\\n\";\r\n posEnd = new position_1.Position(i + 1, rows[i].length + 1);\r\n }\r\n else if (code !== \"\" && posStart && posEnd) {\r\n issues = issues.concat(this.check(code.trim(), file, posStart, posEnd, obj));\r\n code = \"\";\r\n }\r\n }\r\n if (posStart && posEnd) {\r\n issues = issues.concat(this.check(code.trim(), file, posStart, posEnd, obj));\r\n }\r\n return issues;\r\n }\r\n check(code, file, posStart, posEnd, obj) {\r\n // assumption: code must end with \".\" in order to be valid ABAP\r\n if (code === \"\" || code.charAt(code.length - 1) !== \".\") {\r\n return [];\r\n }\r\n const commented = new memory_file_1.MemoryFile(\"_foobar.prog.abap\", code);\r\n const abapFile = new abap_parser_1.ABAPParser().parse([commented]).output[0];\r\n const statementNodes = abapFile.getStatements();\r\n if (statementNodes.length === 0) {\r\n return [];\r\n }\r\n let containsStatement = false;\r\n for (const statementNode of statementNodes) {\r\n const statement = statementNode.get();\r\n if (this.getConfig().allowIncludeInFugr === true\r\n && obj instanceof objects_1.FunctionGroup\r\n && statement instanceof statements_1.Include) {\r\n continue;\r\n }\r\n if (!(statement instanceof _statement_1.Unknown\r\n || statement instanceof _statement_1.Empty\r\n || statement instanceof _statement_1.Comment)) {\r\n containsStatement = true;\r\n break;\r\n }\r\n }\r\n if (!containsStatement) {\r\n return [];\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, posStart, posEnd);\r\n const issue = issue_1.Issue.atRange(file, posStart, posEnd, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n return [issue];\r\n }\r\n isCommentLine(text) {\r\n return (text.substr(0, 1) === \"*\")\r\n || (text.trim().substr(0, 1) === \"\\\"\" && text.trim().substr(1, 1) !== \"!\");\r\n }\r\n}\r\nexports.CommentedCode = CommentedCode;\r\n//# sourceMappingURL=commented_code.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/commented_code.js?");
11482
11493
 
11483
11494
  /***/ }),
11484
11495
 
@@ -11500,7 +11511,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11500
11511
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11501
11512
 
11502
11513
  "use strict";
11503
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConstructorVisibilityPublic = exports.ConstructorVisibilityPublicConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ConstructorVisibilityPublicConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ConstructorVisibilityPublicConf = ConstructorVisibilityPublicConf;\r\nclass ConstructorVisibilityPublic {\r\n constructor() {\r\n this.conf = new ConstructorVisibilityPublicConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"constructor_visibility_public\",\r\n title: \"Check constructor visibility is public\",\r\n shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,\r\n extendedInformation: `\nThis only applies to global classes.\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public\nhttps://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Constructor visibility should be public\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const issues = [];\r\n if (!(obj instanceof objects_1.Class)) {\r\n return [];\r\n }\r\n const def = obj.getClassDefinition();\r\n if (def === undefined) {\r\n return [];\r\n }\r\n for (const method of def.methods) {\r\n if (method.name.toUpperCase() === \"CONSTRUCTOR\"\r\n && method.visibility !== visibility_1.Visibility.Public) {\r\n const issue = issue_1.Issue.atIdentifier(method.identifier, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ConstructorVisibilityPublic = ConstructorVisibilityPublic;\r\n//# sourceMappingURL=constructor_visibility_public.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js?");
11514
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConstructorVisibilityPublic = exports.ConstructorVisibilityPublicConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ConstructorVisibilityPublicConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ConstructorVisibilityPublicConf = ConstructorVisibilityPublicConf;\r\nclass ConstructorVisibilityPublic {\r\n constructor() {\r\n this.conf = new ConstructorVisibilityPublicConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"constructor_visibility_public\",\r\n title: \"Check constructor visibility is public\",\r\n shortDescription: `Constructor must be placed in the public section, even if the class is not CREATE PUBLIC.`,\r\n extendedInformation: `\r\nThis only applies to global classes.\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#if-your-global-class-is-create-private-leave-the-constructor-public\r\nhttps://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abeninstance_constructor_guidl.htm`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Constructor visibility should be public\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const issues = [];\r\n if (!(obj instanceof objects_1.Class)) {\r\n return [];\r\n }\r\n const def = obj.getClassDefinition();\r\n if (def === undefined) {\r\n return [];\r\n }\r\n for (const method of def.methods) {\r\n if (method.name.toUpperCase() === \"CONSTRUCTOR\"\r\n && method.visibility !== visibility_1.Visibility.Public) {\r\n const issue = issue_1.Issue.atIdentifier(method.identifier, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ConstructorVisibilityPublic = ConstructorVisibilityPublic;\r\n//# sourceMappingURL=constructor_visibility_public.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js?");
11504
11515
 
11505
11516
  /***/ }),
11506
11517
 
@@ -11511,7 +11522,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11511
11522
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11512
11523
 
11513
11524
  "use strict";
11514
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ContainsTab = exports.ContainsTabConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ContainsTabConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** quick fix replace with number of spaces */\r\n this.spaces = 1;\r\n }\r\n}\r\nexports.ContainsTabConf = ContainsTabConf;\r\nclass ContainsTab extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ContainsTabConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"contains_tab\",\r\n title: \"Code contains tab\",\r\n shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,\r\n extendedInformation: `\nhttps://docs.abapopenchecks.org/checks/09/\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Code should not contain tabs\";\r\n }\r\n getConfig() {\r\n if (this.conf.spaces === undefined) {\r\n this.conf.spaces = 1;\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const lines = file.getRaw().split(\"\\n\");\r\n lines.forEach((_, i) => {\r\n const tabCol = lines[i].indexOf(\"\\t\");\r\n if (tabCol >= 0) {\r\n let tabAmount = 1;\r\n while (lines[i].indexOf(\"\\t\", tabCol + tabAmount - 1) >= 0) {\r\n tabAmount++;\r\n }\r\n issues.push(this.createIssue(i, tabCol, tabAmount, file));\r\n }\r\n });\r\n return issues;\r\n }\r\n createIssue(line, tabCol, tabAmount, file) {\r\n const tabStartPos = new position_1.Position(line + 1, tabCol + 1);\r\n const tabEndPos = new position_1.Position(line + 1, tabCol + tabAmount);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, tabStartPos, tabEndPos, \" \".repeat(this.getConfig().spaces));\r\n return issue_1.Issue.atRange(file, tabStartPos, tabEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n}\r\nexports.ContainsTab = ContainsTab;\r\n//# sourceMappingURL=contains_tab.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/contains_tab.js?");
11525
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ContainsTab = exports.ContainsTabConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ContainsTabConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** quick fix replace with number of spaces */\r\n this.spaces = 1;\r\n }\r\n}\r\nexports.ContainsTabConf = ContainsTabConf;\r\nclass ContainsTab extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ContainsTabConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"contains_tab\",\r\n title: \"Code contains tab\",\r\n shortDescription: `Checks for usage of tabs (enable to enforce spaces)`,\r\n extendedInformation: `\r\nhttps://docs.abapopenchecks.org/checks/09/\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Code should not contain tabs\";\r\n }\r\n getConfig() {\r\n if (this.conf.spaces === undefined) {\r\n this.conf.spaces = 1;\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const lines = file.getRaw().split(\"\\n\");\r\n lines.forEach((_, i) => {\r\n const tabCol = lines[i].indexOf(\"\\t\");\r\n if (tabCol >= 0) {\r\n let tabAmount = 1;\r\n while (lines[i].indexOf(\"\\t\", tabCol + tabAmount - 1) >= 0) {\r\n tabAmount++;\r\n }\r\n issues.push(this.createIssue(i, tabCol, tabAmount, file));\r\n }\r\n });\r\n return issues;\r\n }\r\n createIssue(line, tabCol, tabAmount, file) {\r\n const tabStartPos = new position_1.Position(line + 1, tabCol + 1);\r\n const tabEndPos = new position_1.Position(line + 1, tabCol + tabAmount);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, tabStartPos, tabEndPos, \" \".repeat(this.getConfig().spaces));\r\n return issue_1.Issue.atRange(file, tabStartPos, tabEndPos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n}\r\nexports.ContainsTab = ContainsTab;\r\n//# sourceMappingURL=contains_tab.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/contains_tab.js?");
11515
11526
 
11516
11527
  /***/ }),
11517
11528
 
@@ -11544,7 +11555,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11544
11555
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11545
11556
 
11546
11557
  "use strict";
11547
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DangerousStatement = exports.DangerousStatementConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass DangerousStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects execSQL (dynamic SQL) */\r\n this.execSQL = true;\r\n /** Detects kernel calls */\r\n this.kernelCall = true;\r\n /** Detects SYSTEM-CALL */\r\n this.systemCall = true;\r\n /** Detects INSERT REPORT */\r\n this.insertReport = true;\r\n this.generateDynpro = true;\r\n this.generateReport = true;\r\n this.generateSubroutine = true;\r\n this.deleteReport = true;\r\n this.deleteTextpool = true;\r\n this.deleteDynpro = true;\r\n this.importDynpro = true;\r\n /** Finds instances of dynamic SQL: SELECT, UPDATE, DELETE, INSERT, MODIFY */\r\n this.dynamicSQL = true;\r\n }\r\n}\r\nexports.DangerousStatementConf = DangerousStatementConf;\r\nclass DangerousStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new DangerousStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"dangerous_statement\",\r\n title: \"Dangerous statement\",\r\n shortDescription: `Detects potentially dangerous statements`,\r\n extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,\ndynamic SQL can potentially create SQL injection problems`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],\r\n };\r\n }\r\n getDescription(statement) {\r\n return \"Potential dangerous statement \" + statement;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const statementNode of file.getStatements()) {\r\n const statement = statementNode.get();\r\n let message = undefined;\r\n if (this.conf.execSQL && statement instanceof Statements.ExecSQL) {\r\n message = \"EXEC SQL\";\r\n }\r\n else if (this.conf.kernelCall && statement instanceof Statements.CallKernel) {\r\n message = \"KERNEL CALL\";\r\n }\r\n else if (this.conf.systemCall && statement instanceof Statements.SystemCall) {\r\n message = \"SYSTEM-CALL\";\r\n }\r\n else if (this.conf.insertReport && statement instanceof Statements.InsertReport) {\r\n message = \"INSERT REPORT\";\r\n }\r\n else if (this.conf.generateDynpro && statement instanceof Statements.GenerateDynpro) {\r\n message = \"GENERATE DYNPRO\";\r\n }\r\n else if (this.conf.generateReport && statement instanceof Statements.GenerateReport) {\r\n message = \"GENERATE REPORT\";\r\n }\r\n else if (this.conf.generateSubroutine && statement instanceof Statements.GenerateSubroutine) {\r\n message = \"GENERATE SUBROUTINE\";\r\n }\r\n else if (this.conf.deleteReport && statement instanceof Statements.DeleteReport) {\r\n message = \"DELETE REPORT\";\r\n }\r\n else if (this.conf.deleteTextpool && statement instanceof Statements.DeleteTextpool) {\r\n message = \"DELETE TEXTPOOL\";\r\n }\r\n else if (this.conf.deleteDynpro && statement instanceof Statements.DeleteDynpro) {\r\n message = \"DELETE DYNPRO\";\r\n }\r\n else if (this.conf.importDynpro && statement instanceof Statements.ImportDynpro) {\r\n message = \"IMPORT DYNPRO\";\r\n }\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n if (this.conf.dynamicSQL) {\r\n message = this.findDynamicSQL(statementNode);\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n findDynamicSQL(statementNode) {\r\n const statement = statementNode.get();\r\n if (statement instanceof Statements.UpdateDatabase\r\n || statement instanceof Statements.Select\r\n || statement instanceof Statements.SelectLoop\r\n || statement instanceof Statements.InsertDatabase\r\n || statement instanceof Statements.ModifyDatabase\r\n || statement instanceof Statements.DeleteDatabase) {\r\n if (statementNode.findFirstExpression(Expressions.Dynamic)) {\r\n return \"Dynamic SQL\";\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.DangerousStatement = DangerousStatement;\r\n//# sourceMappingURL=dangerous_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js?");
11558
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DangerousStatement = exports.DangerousStatementConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass DangerousStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects execSQL (dynamic SQL) */\r\n this.execSQL = true;\r\n /** Detects kernel calls */\r\n this.kernelCall = true;\r\n /** Detects SYSTEM-CALL */\r\n this.systemCall = true;\r\n /** Detects INSERT REPORT */\r\n this.insertReport = true;\r\n this.generateDynpro = true;\r\n this.generateReport = true;\r\n this.generateSubroutine = true;\r\n this.deleteReport = true;\r\n this.deleteTextpool = true;\r\n this.deleteDynpro = true;\r\n this.importDynpro = true;\r\n /** Finds instances of dynamic SQL: SELECT, UPDATE, DELETE, INSERT, MODIFY */\r\n this.dynamicSQL = true;\r\n }\r\n}\r\nexports.DangerousStatementConf = DangerousStatementConf;\r\nclass DangerousStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new DangerousStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"dangerous_statement\",\r\n title: \"Dangerous statement\",\r\n shortDescription: `Detects potentially dangerous statements`,\r\n extendedInformation: `Dynamic SQL: Typically ABAP logic does not need dynamic SQL,\r\ndynamic SQL can potentially create SQL injection problems`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Security],\r\n };\r\n }\r\n getDescription(statement) {\r\n return \"Potential dangerous statement \" + statement;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const statementNode of file.getStatements()) {\r\n const statement = statementNode.get();\r\n let message = undefined;\r\n if (this.conf.execSQL && statement instanceof Statements.ExecSQL) {\r\n message = \"EXEC SQL\";\r\n }\r\n else if (this.conf.kernelCall && statement instanceof Statements.CallKernel) {\r\n message = \"KERNEL CALL\";\r\n }\r\n else if (this.conf.systemCall && statement instanceof Statements.SystemCall) {\r\n message = \"SYSTEM-CALL\";\r\n }\r\n else if (this.conf.insertReport && statement instanceof Statements.InsertReport) {\r\n message = \"INSERT REPORT\";\r\n }\r\n else if (this.conf.generateDynpro && statement instanceof Statements.GenerateDynpro) {\r\n message = \"GENERATE DYNPRO\";\r\n }\r\n else if (this.conf.generateReport && statement instanceof Statements.GenerateReport) {\r\n message = \"GENERATE REPORT\";\r\n }\r\n else if (this.conf.generateSubroutine && statement instanceof Statements.GenerateSubroutine) {\r\n message = \"GENERATE SUBROUTINE\";\r\n }\r\n else if (this.conf.deleteReport && statement instanceof Statements.DeleteReport) {\r\n message = \"DELETE REPORT\";\r\n }\r\n else if (this.conf.deleteTextpool && statement instanceof Statements.DeleteTextpool) {\r\n message = \"DELETE TEXTPOOL\";\r\n }\r\n else if (this.conf.deleteDynpro && statement instanceof Statements.DeleteDynpro) {\r\n message = \"DELETE DYNPRO\";\r\n }\r\n else if (this.conf.importDynpro && statement instanceof Statements.ImportDynpro) {\r\n message = \"IMPORT DYNPRO\";\r\n }\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n if (this.conf.dynamicSQL) {\r\n message = this.findDynamicSQL(statementNode);\r\n if (message) {\r\n issues.push(issue_1.Issue.atStatement(file, statementNode, this.getDescription(message), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n findDynamicSQL(statementNode) {\r\n const statement = statementNode.get();\r\n if (statement instanceof Statements.UpdateDatabase\r\n || statement instanceof Statements.Select\r\n || statement instanceof Statements.SelectLoop\r\n || statement instanceof Statements.InsertDatabase\r\n || statement instanceof Statements.ModifyDatabase\r\n || statement instanceof Statements.DeleteDatabase) {\r\n if (statementNode.findFirstExpression(Expressions.Dynamic)) {\r\n return \"Dynamic SQL\";\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.DangerousStatement = DangerousStatement;\r\n//# sourceMappingURL=dangerous_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js?");
11548
11559
 
11549
11560
  /***/ }),
11550
11561
 
@@ -11599,7 +11610,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11599
11610
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11600
11611
 
11601
11612
  "use strict";
11602
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Downport = exports.DownportConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\n// todo: refactor each sub-rule to new classes?\r\n// todo: add configuration\r\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.DownportConf = DownportConf;\r\nclass Downport {\r\n constructor() {\r\n this.conf = new DownportConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"downport\",\r\n title: \"Downport statement\",\r\n shortDescription: `Experimental downport functionality`,\r\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\na higher level language version. If successful, various rules are applied to downport the statement.\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\n\nCurrent rules:\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\n* FIELD-SYMBOL() definitions are outlined\n* CONV is outlined\n* COND is outlined\n* REDUCE is outlined\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\n* CAST changed to ?=\n* LOOP AT method_call( ) is outlined\n* VALUE # with structure fields\n* VALUE # with internal table lines\n* Table Expressions[ index ] are outlined\n* SELECT INTO @DATA definitions are outlined\n* Some occurrences of string template formatting option ALPHA changed to function module call\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\n* RAISE EXCEPTION ... MESSAGE\n* APPEND expression is outlined\n\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\r\n tags: [_irule_1.RuleTag.Experimental, _irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.lowReg = reg;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\r\n this.initHighReg();\r\n }\r\n return this;\r\n }\r\n run(lowObj) {\r\n const ret = [];\r\n this.counter = 1;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\r\n return ret;\r\n }\r\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\r\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highSyntax = new syntax_1.SyntaxLogic(this.highReg, highObj).run();\r\n for (const lowFile of lowObj.getABAPFiles()) {\r\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\r\n if (highFile === undefined) {\r\n continue;\r\n }\r\n const lowStatements = lowFile.getStatements();\r\n const highStatements = highFile.getStatements();\r\n if (lowStatements.length !== highStatements.length) {\r\n // after applying a fix, there might be more statements in lowFile\r\n // should highReg be initialized again?\r\n /*\r\n const message = \"Internal Error: Statement lengths does not match\";\r\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\r\n */\r\n continue;\r\n }\r\n for (let i = 0; i < lowStatements.length; i++) {\r\n const low = lowStatements[i];\r\n const high = highStatements[i];\r\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\r\n || high.findFirstExpression(Expressions.InlineData)) {\r\n const issue = this.checkStatement(low, high, lowFile, highSyntax);\r\n if (issue) {\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////\r\n /** clones the orginal repository into highReg, and parses it with higher language version */\r\n initHighReg() {\r\n // use default configuration, ie. default target version\r\n const highConfig = config_1.Config.getDefault().get();\r\n const lowConfig = this.lowReg.getConfig().get();\r\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\r\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\r\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\r\n this.highReg = new registry_1.Registry();\r\n for (const o of this.lowReg.getObjects()) {\r\n for (const f of o.getFiles()) {\r\n if (this.lowReg.isDependency(o) === true) {\r\n this.highReg.addDependency(f);\r\n }\r\n else {\r\n this.highReg.addFile(f);\r\n }\r\n }\r\n }\r\n this.highReg.parse();\r\n }\r\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\r\n checkStatement(low, high, lowFile, highSyntax) {\r\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n return undefined;\r\n }\r\n let found = this.partiallyImplemented(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.raiseException(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.emptyKey(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.stringTemplateAlpha(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopInput(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineValue(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineReduce(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCast(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineConv(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCond(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineDataSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineData(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineFS(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.newToCreateObject(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceXsdBool(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n // todo, line_exists() should be replaced before this call\r\n found = this.replaceTableExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n // todo, add more rules here\r\n return undefined;\r\n }\r\n //////////////////////////////////////////\r\n downportSQLExtras(low, high, lowFile, _highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n // todo: select loop\r\n if (!(high.get() instanceof Statements.Select)\r\n && !(high.get() instanceof Statements.UpdateDatabase)\r\n && !(high.get() instanceof Statements.ModifyDatabase)\r\n && !(high.get() instanceof Statements.DeleteDatabase)\r\n && !(high.get() instanceof Statements.InsertDatabase)) {\r\n return undefined;\r\n }\r\n let fix = undefined;\r\n const addFix = (token) => {\r\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\r\n if (fix === undefined) {\r\n fix = add;\r\n }\r\n else {\r\n fix = edit_helper_1.EditHelper.merge(fix, add);\r\n }\r\n };\r\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\r\n high.findAllExpressionsRecursive(Expressions.SQLSource),\r\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\r\n for (const c of candidates) {\r\n if (c.getFirstToken() instanceof tokens_1.WAt) {\r\n addFix(c.getFirstToken());\r\n }\r\n }\r\n for (const fieldList of high.findAllExpressionsRecursive(Expressions.SQLFieldList)) {\r\n for (const token of fieldList.getDirectTokens()) {\r\n if (token.getStr() === \",\") {\r\n addFix(token);\r\n }\r\n }\r\n }\r\n if (fix === undefined) {\r\n return undefined;\r\n }\r\n else {\r\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove \\\" and ,\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n downportSelectInline(low, high, lowFile, highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)\r\n || !(high.get() instanceof Statements.Select)) {\r\n return undefined;\r\n }\r\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\r\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n downportSelectSingleInline(_low, high, lowFile, _highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinition = \"\";\r\n const fields = fieldList.findDirectExpressions(Expressions.SQLFieldName);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n if (fields.length === 1) {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\r\n }\r\n else {\r\n for (const f of fields) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n fieldDefinition = `DATA: BEGIN OF ${name},\n${fieldDefinition}${indentation} END OF ${name}.`;\r\n }\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n downportSelectTableInline(_low, high, lowFile, highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinitions = \"\";\r\n for (const f of fieldList.findDirectExpressions(Expressions.SQLFieldName)) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n replaceAppendExpression(high, lowFile, highSyntax) {\r\n if (!(high.get() instanceof Statements.Append)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n if (children[1].get() instanceof Expressions.Source) {\r\n const source = children[1];\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = high.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n replaceTableExpression(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const fieldChain of node.findAllExpressionsRecursive(Expressions.FieldChain)) {\r\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\r\n if (tableExpression === undefined) {\r\n continue;\r\n }\r\n if (tableExpression.getChildren().length > 3) {\r\n // for now, only support the INDEX scenario\r\n continue;\r\n }\r\n let pre = \"\";\r\n let startToken = undefined;\r\n for (const child of fieldChain.getChildren()) {\r\n if (startToken === undefined) {\r\n startToken = child.getFirstToken();\r\n }\r\n else if (child === tableExpression) {\r\n break;\r\n }\r\n pre += child.concatTokens();\r\n }\r\n if (startToken === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\n${indentation}READ TABLE ${pre} INDEX ${(_a = tableExpression.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()} INTO ${uniqueName}.\n${indentation}IF sy-subrc <> 0.\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\n${indentation}ENDIF.\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineDataSimple(node, lowFile) {\r\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n const source = node.findFirstExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n else if (source.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldLength)) {\r\n return undefined;\r\n }\r\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const lastToken = node.getLastToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n partiallyImplemented(node, lowFile) {\r\n if (node.get() instanceof Statements.InterfaceDef) {\r\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\r\n if (partially === undefined) {\r\n return undefined;\r\n }\r\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\r\n if (implemented === undefined) {\r\n return undefined;\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\r\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n raiseException(node, lowFile, highSyntax) {\r\n /*\r\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\r\n \r\n DATA foo LIKE if_t100_message=>t100key.\r\n foo-msgid = 'ZHVAM'.\r\n foo-msgno = '001'.\r\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\r\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\r\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\r\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\r\n DATA bar TYPE REF TO zcl_hvam_exception.\r\n CREATE OBJECT bar EXPORTING textid = foo.\r\n bar->if_t100_dyn_msg~msgty = 'E'.\r\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\r\n RAISE EXCEPTION bar.\r\n */\r\n var _a;\r\n if (node.get() instanceof Statements.Raise) {\r\n const startToken = node.findDirectTokenByText(\"ID\");\r\n if (startToken === undefined) {\r\n return undefined;\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n const id = sources[0].concatTokens();\r\n const number = sources[1].concatTokens();\r\n const className = ((_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || \"ERROR\";\r\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\n${indentation}${uniqueName1}-msgid = ${id}.\n${indentation}${uniqueName1}-msgno = ${number}.\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\r\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n emptyKey(node, lowFile) {\r\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\r\n const key = i.findDirectExpression(Expressions.TypeTableKey);\r\n if (key === undefined) {\r\n continue;\r\n }\r\n i = key;\r\n const concat = i.concatTokens();\r\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\r\n continue;\r\n }\r\n const token = i.findDirectTokenByText(\"EMPTY\");\r\n if (token === undefined) {\r\n continue;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\r\n stringTemplateAlpha(node, lowFile) {\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const topSource = node.findDirectExpression(Expressions.Source);\r\n if (topSource === undefined || topSource.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n const child = topSource.getFirstChild();\r\n if (!(child.get() instanceof Expressions.StringTemplate)) {\r\n return undefined;\r\n }\r\n const templateTokens = child.getChildren();\r\n if (templateTokens.length !== 3\r\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\r\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\r\n return undefined;\r\n }\r\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\r\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n let functionName = \"\";\r\n switch (formatting) {\r\n case \"ALPHA = IN\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\r\n break;\r\n case \"ALPHA = OUT\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const topTarget = (_c = node.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const code = `CALL FUNCTION '${functionName}'\n${indentation} EXPORTING\n${indentation} input = ${source}\n${indentation} IMPORTING\n${indentation} output = ${topTarget}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopInput(node, lowFile, highSyntax) {\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n else if (node.findDirectExpression(Expressions.SimpleSource2)) {\r\n return undefined;\r\n }\r\n // the first Source must be outlined\r\n const s = node.findDirectExpression(Expressions.Source);\r\n if (s === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopTarget(node, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d, _e;\r\n // also allows outlining of voided types\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (sourceName === undefined) {\r\n return undefined;\r\n }\r\n const concat = node.concatTokens();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const dataTarget = (_b = node.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);\r\n if (dataTarget) {\r\n const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n const fsTarget = (_d = node.findDirectExpression(Expressions.FSTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.InlineFS);\r\n if (fsTarget) {\r\n const targetName = ((_e = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineReduce(node, lowFile, highSyntax) {\r\n var _a, _b, _c, _d;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\r\n if (reduceBody === undefined) {\r\n continue;\r\n }\r\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n name = init.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_a = reduceBody.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()}.\\n`;\r\n }\r\n const loop = reduceBody.findFirstExpression(Expressions.InlineLoopDefinition);\r\n if (loop === undefined) {\r\n continue;\r\n }\r\n const loopSource = (_b = loop.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const loopTargetField = (_c = loop.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n if (loopTargetField) {\r\n body += indentation + `LOOP AT ${loopSource} INTO DATA(${loopTargetField}).\\n`;\r\n }\r\n if (loopTargetField === undefined) {\r\n const loopTargetFieldSymbol = (_d = loop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n }\r\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n for (const n of next.getChildren()) {\r\n if (n.concatTokens().toUpperCase() === \"NEXT\") {\r\n continue;\r\n }\r\n else if (n.concatTokens() === \"=\") {\r\n body += \" = \";\r\n }\r\n else if (n.get() instanceof Expressions.Field) {\r\n body += indentation + \" \" + n.concatTokens();\r\n }\r\n else if (n.get() instanceof Expressions.Source) {\r\n body += n.concatTokens() + \".\\n\";\r\n }\r\n }\r\n body += indentation + `ENDLOOP.\\n`;\r\n body += indentation + `${uniqueName} = ${name}.\\n`;\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineValue(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n const allSources = node.findAllExpressionsRecursive(Expressions.Source);\r\n for (const i of allSources) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const valueBody = i.findDirectExpression(Expressions.ValueBody);\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n let indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n const loop = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findFirstExpression(Expressions.InlineLoopDefinition);\r\n if (loop) {\r\n const loopSource = (_a = loop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const loopTargetFieldSymbol = (_b = loop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n indentation += \" \";\r\n }\r\n let structureName = uniqueName;\r\n let added = false;\r\n let data = \"\";\r\n for (const b of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\r\n if (b.concatTokens() === \"(\" && added === false) {\r\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\r\n }\r\n if (b.get() instanceof Expressions.FieldAssignment) {\r\n if (added === false) {\r\n body += data;\r\n added = true;\r\n }\r\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\r\n }\r\n else if (b.get() instanceof Expressions.Source) {\r\n structureName = b.concatTokens();\r\n }\r\n else if (b instanceof nodes_1.ExpressionNode && b.get() instanceof Expressions.Let) {\r\n body += this.outlineLet(b, indentation, highSyntax, lowFile);\r\n }\r\n else if (b.concatTokens() === \")\") {\r\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\r\n }\r\n }\r\n if (loop) {\r\n indentation = indentation.substr(2);\r\n body += indentation + `ENDLOOP.\\n`;\r\n }\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineLet(node, indentation, highSyntax, lowFile) {\r\n var _a;\r\n let ret = \"\";\r\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n const c = f.getFirstChild();\r\n if (c === undefined) {\r\n continue;\r\n }\r\n const name = c.concatTokens().toLowerCase();\r\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\r\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\r\n const source = f.findFirstExpression(Expressions.Source);\r\n if (source) {\r\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\r\n }\r\n }\r\n return ret;\r\n }\r\n findType(i, lowFile, highSyntax) {\r\n var _a;\r\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\r\n if (expr === undefined) {\r\n return undefined;\r\n }\r\n const firstToken = expr.getFirstToken();\r\n const concat = expr.concatTokens().toLowerCase();\r\n if (concat !== \"#\") {\r\n return concat;\r\n }\r\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n return undefined;\r\n }\r\n let inferred = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.InferredType\r\n && r.resolved\r\n && r.position.getStart().equals(firstToken.getStart())\r\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n inferred = r.resolved;\r\n break;\r\n }\r\n }\r\n if (inferred === undefined) {\r\n return undefined;\r\n }\r\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\r\n }\r\n outlineFS(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineFS)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `FIELD-SYMBOLS ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineData(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `DATA ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCond(node, lowFile, highSyntax) {\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\r\n continue;\r\n }\r\n const body = i.findDirectExpression(Expressions.CondBody);\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const bodyCode = this.buildCondBody(body, uniqueName, indent);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` + bodyCode;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n buildCondBody(body, uniqueName, indent) {\r\n let code = indent;\r\n for (const c of body.getChildren()) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n switch (c.getFirstToken().getStr().toUpperCase()) {\r\n case \"WHEN\":\r\n code += \"IF \";\r\n break;\r\n case \"THEN\":\r\n code += \".\\n\";\r\n break;\r\n case \"ELSE\":\r\n code += indent + \"ELSE.\\n\";\r\n break;\r\n default:\r\n throw \"buildCondBody, unexpected token\";\r\n }\r\n }\r\n else if (c.get() instanceof Expressions.Cond) {\r\n code += c.concatTokens();\r\n }\r\n else if (c.get() instanceof Expressions.Source) {\r\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\r\n }\r\n else {\r\n throw \"buildCondBody, unexpected expression\";\r\n }\r\n }\r\n code += indent + \"ENDIF.\\n\";\r\n code += indent;\r\n return code;\r\n }\r\n outlineConv(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\r\n continue;\r\n }\r\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n indent + `${uniqueName} = ${body}.\\n` +\r\n indent;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // \"CAST\" to \"?=\"\r\n outlineCast(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Cast)) {\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const abap = `DATA ${uniqueName} TYPE REF TO ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1) +\r\n `${uniqueName} ?= ${body}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n uniqueName(position, filename, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\r\n if (spag === undefined) {\r\n return \"uniqueErrorSpag\";\r\n }\r\n while (true) {\r\n const name = \"temp\" + this.counter;\r\n const found = spag.findVariable(name);\r\n this.counter++;\r\n if (found === undefined) {\r\n return name;\r\n }\r\n }\r\n }\r\n replaceXsdBool(node, lowFile, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\r\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\r\n const token = r.position.getToken();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newToCreateObject(node, lowFile, highSyntax) {\r\n const source = node.findDirectExpression(Expressions.Source);\r\n let fix = undefined;\r\n if (node.get() instanceof Statements.Move\r\n && source\r\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\r\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\r\n // todo, assumption: the target is not an inline definition\r\n if (target && found && source.concatTokens() === found.concatTokens()) {\r\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\r\n if (abap !== undefined) {\r\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), abap);\r\n }\r\n }\r\n }\r\n if (fix === undefined && node.findAllExpressions(Expressions.NewObject)) {\r\n const found = node.findFirstExpression(Expressions.NewObject);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const abap = this.newParameters(found, name, highSyntax, lowFile);\r\n if (abap === undefined) {\r\n return undefined;\r\n }\r\n const type = this.findType(found, lowFile, highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\r\n indentation + abap + \"\\n\" +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), data);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\r\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n }\r\n if (fix) {\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n newParameters(found, name, highSyntax, lowFile) {\r\n var _a, _b, _c;\r\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\r\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\r\n if (parameters) {\r\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\r\n }\r\n else if (typeToken) {\r\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (source) {\r\n // find the default parameter name for the constructor\r\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\r\n let cdef = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\r\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\r\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\r\n cdef = r.resolved;\r\n }\r\n }\r\n if (cdef && cdef.getMethodDefinitions === undefined) {\r\n return undefined; // something wrong\r\n }\r\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\r\n if (importing) {\r\n extra += \" EXPORTING \" + importing + \" = \" + source;\r\n }\r\n else if (spag === undefined) {\r\n extra += \" SpagUndefined\";\r\n }\r\n else if (cdef === undefined) {\r\n extra += \" ClassDefinitionNotFound\";\r\n }\r\n else {\r\n extra += \" SomeError\";\r\n }\r\n }\r\n }\r\n const abap = `CREATE OBJECT ${name}${extra}.`;\r\n return abap;\r\n }\r\n}\r\nexports.Downport = Downport;\r\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
11613
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Downport = exports.DownportConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst registry_1 = __webpack_require__(/*! ../registry */ \"./node_modules/@abaplint/core/build/src/registry.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst config_1 = __webpack_require__(/*! ../config */ \"./node_modules/@abaplint/core/build/src/config.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\n// todo: refactor each sub-rule to new classes?\r\n// todo: add configuration\r\nclass DownportConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.DownportConf = DownportConf;\r\nclass Downport {\r\n constructor() {\r\n this.conf = new DownportConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"downport\",\r\n title: \"Downport statement\",\r\n shortDescription: `Experimental downport functionality`,\r\n extendedInformation: `Much like the 'commented_code' rule this rule loops through unknown statements and tries parsing with\r\na higher level language version. If successful, various rules are applied to downport the statement.\r\nTarget downport version is always v702, thus rule is only enabled if target version is v702.\r\n\r\nCurrent rules:\r\n* NEW transformed to CREATE OBJECT, opposite of https://rules.abaplint.org/use_new/\r\n* DATA() definitions are outlined, opposite of https://rules.abaplint.org/prefer_inline/\r\n* FIELD-SYMBOL() definitions are outlined\r\n* CONV is outlined\r\n* COND is outlined\r\n* REDUCE is outlined\r\n* EMPTY KEY is changed to DEFAULT KEY, opposite of DEFAULT KEY in https://rules.abaplint.org/avoid_use/\r\n* CAST changed to ?=\r\n* LOOP AT method_call( ) is outlined\r\n* VALUE # with structure fields\r\n* VALUE # with internal table lines\r\n* Table Expressions[ index ] are outlined\r\n* SELECT INTO @DATA definitions are outlined\r\n* Some occurrences of string template formatting option ALPHA changed to function module call\r\n* SELECT/INSERT/MODIFY/DELETE/UPDATE \",\" in field list removed, \"@\" in source/targets removed\r\n* PARTIALLY IMPLEMENTED removed, it can be quick fixed via rule implement_methods\r\n* RAISE EXCEPTION ... MESSAGE\r\n* APPEND expression is outlined\r\n\r\nOnly one transformation is applied to a statement at a time, so multiple steps might be required to do the full downport.`,\r\n tags: [_irule_1.RuleTag.Experimental, _irule_1.RuleTag.Downport, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.lowReg = reg;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version === version_1.Version.v702 || version === version_1.Version.OpenABAP) {\r\n this.initHighReg();\r\n }\r\n return this;\r\n }\r\n run(lowObj) {\r\n const ret = [];\r\n this.counter = 1;\r\n const version = this.lowReg.getConfig().getVersion();\r\n if (version !== version_1.Version.v702 && version !== version_1.Version.OpenABAP) {\r\n return ret;\r\n }\r\n else if (!(lowObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highObj = this.highReg.getObject(lowObj.getType(), lowObj.getName());\r\n if (highObj === undefined || !(highObj instanceof _abap_object_1.ABAPObject)) {\r\n return ret;\r\n }\r\n const highSyntax = new syntax_1.SyntaxLogic(this.highReg, highObj).run();\r\n for (const lowFile of lowObj.getABAPFiles()) {\r\n const highFile = highObj.getABAPFileByName(lowFile.getFilename());\r\n if (highFile === undefined) {\r\n continue;\r\n }\r\n const lowStatements = lowFile.getStatements();\r\n const highStatements = highFile.getStatements();\r\n if (lowStatements.length !== highStatements.length) {\r\n // after applying a fix, there might be more statements in lowFile\r\n // should highReg be initialized again?\r\n /*\r\n const message = \"Internal Error: Statement lengths does not match\";\r\n ret.push(Issue.atStatement(lowFile, lowStatements[0], message, this.getMetadata().key));\r\n */\r\n continue;\r\n }\r\n for (let i = 0; i < lowStatements.length; i++) {\r\n const low = lowStatements[i];\r\n const high = highStatements[i];\r\n if ((low.get() instanceof _statement_1.Unknown && !(high.get() instanceof _statement_1.Unknown))\r\n || high.findFirstExpression(Expressions.InlineData)) {\r\n const issue = this.checkStatement(low, high, lowFile, highSyntax);\r\n if (issue) {\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n ////////////////////\r\n /** clones the orginal repository into highReg, and parses it with higher language version */\r\n initHighReg() {\r\n // use default configuration, ie. default target version\r\n const highConfig = config_1.Config.getDefault().get();\r\n const lowConfig = this.lowReg.getConfig().get();\r\n highConfig.syntax.errorNamespace = lowConfig.syntax.errorNamespace;\r\n highConfig.syntax.globalConstants = lowConfig.syntax.globalConstants;\r\n highConfig.syntax.globalMacros = lowConfig.syntax.globalMacros;\r\n this.highReg = new registry_1.Registry();\r\n for (const o of this.lowReg.getObjects()) {\r\n for (const f of o.getFiles()) {\r\n if (this.lowReg.isDependency(o) === true) {\r\n this.highReg.addDependency(f);\r\n }\r\n else {\r\n this.highReg.addFile(f);\r\n }\r\n }\r\n }\r\n this.highReg.parse();\r\n }\r\n /** applies one rule at a time, multiple iterations are required to transform complex statements */\r\n checkStatement(low, high, lowFile, highSyntax) {\r\n if (low.getFirstToken().getStart() instanceof position_1.VirtualPosition) {\r\n return undefined;\r\n }\r\n let found = this.partiallyImplemented(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.raiseException(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.emptyKey(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.stringTemplateAlpha(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSQLExtras(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopInput(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineLoopTarget(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineValue(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineReduce(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCast(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineConv(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineCond(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineDataSimple(high, lowFile);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineData(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.outlineFS(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.newToCreateObject(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceXsdBool(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n // todo, line_exists() should be replaced before this call\r\n found = this.replaceTableExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.replaceAppendExpression(high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n // todo, add more rules here\r\n return undefined;\r\n }\r\n //////////////////////////////////////////\r\n downportSQLExtras(low, high, lowFile, _highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)) {\r\n return undefined;\r\n }\r\n // todo: select loop\r\n if (!(high.get() instanceof Statements.Select)\r\n && !(high.get() instanceof Statements.UpdateDatabase)\r\n && !(high.get() instanceof Statements.ModifyDatabase)\r\n && !(high.get() instanceof Statements.DeleteDatabase)\r\n && !(high.get() instanceof Statements.InsertDatabase)) {\r\n return undefined;\r\n }\r\n let fix = undefined;\r\n const addFix = (token) => {\r\n const add = edit_helper_1.EditHelper.deleteToken(lowFile, token);\r\n if (fix === undefined) {\r\n fix = add;\r\n }\r\n else {\r\n fix = edit_helper_1.EditHelper.merge(fix, add);\r\n }\r\n };\r\n const candidates = [high.findAllExpressionsRecursive(Expressions.SQLTarget),\r\n high.findAllExpressionsRecursive(Expressions.SQLSource),\r\n high.findAllExpressionsRecursive(Expressions.SQLSourceSimple)].flat();\r\n for (const c of candidates) {\r\n if (c.getFirstToken() instanceof tokens_1.WAt) {\r\n addFix(c.getFirstToken());\r\n }\r\n }\r\n for (const fieldList of high.findAllExpressionsRecursive(Expressions.SQLFieldList)) {\r\n for (const token of fieldList.getDirectTokens()) {\r\n if (token.getStr() === \",\") {\r\n addFix(token);\r\n }\r\n }\r\n }\r\n if (fix === undefined) {\r\n return undefined;\r\n }\r\n else {\r\n return issue_1.Issue.atToken(lowFile, low.getFirstToken(), \"SQL, remove \\\" and ,\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n downportSelectInline(low, high, lowFile, highSyntax) {\r\n if (!(low.get() instanceof _statement_1.Unknown)\r\n || !(high.get() instanceof Statements.Select)) {\r\n return undefined;\r\n }\r\n // as first step outline the @DATA, note that void types are okay, as long the field names are specified\r\n let found = this.downportSelectSingleInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n found = this.downportSelectTableInline(low, high, lowFile, highSyntax);\r\n if (found) {\r\n return found;\r\n }\r\n return undefined;\r\n }\r\n downportSelectSingleInline(_low, high, lowFile, _highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoStructure)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinition = \"\";\r\n const fields = fieldList.findDirectExpressions(Expressions.SQLFieldName);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n if (fields.length === 1) {\r\n fieldDefinition = `DATA ${name} TYPE ${tableName}-${fields[0].concatTokens()}.`;\r\n }\r\n else {\r\n for (const f of fields) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinition += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n fieldDefinition = `DATA: BEGIN OF ${name},\r\n${fieldDefinition}${indentation} END OF ${name}.`;\r\n }\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `${fieldDefinition}\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n downportSelectTableInline(_low, high, lowFile, highSyntax) {\r\n var _a, _b, _c;\r\n const targets = ((_a = high.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.SQLTarget)) || [];\r\n if (targets.length !== 1) {\r\n return undefined;\r\n }\r\n const inlineData = targets[0].findFirstExpression(Expressions.InlineData);\r\n if (inlineData === undefined) {\r\n return undefined;\r\n }\r\n const sqlFrom = high.findAllExpressions(Expressions.SQLFromSource);\r\n if (sqlFrom.length !== 1) {\r\n return undefined;\r\n }\r\n const tableName = (_b = sqlFrom[0].findDirectExpression(Expressions.DatabaseTable)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (tableName === undefined) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const fieldList = high.findFirstExpression(Expressions.SQLFieldList);\r\n if (fieldList === undefined) {\r\n return undefined;\r\n }\r\n let fieldDefinitions = \"\";\r\n for (const f of fieldList.findDirectExpressions(Expressions.SQLFieldName)) {\r\n const fieldName = f.concatTokens();\r\n fieldDefinitions += indentation + \" \" + fieldName + \" TYPE \" + tableName + \"-\" + fieldName + \",\\n\";\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const name = ((_c = inlineData.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"error\";\r\n let fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `TYPES: BEGIN OF ${uniqueName},\r\n${fieldDefinitions}${indentation} END OF ${uniqueName}.\r\n${indentation}DATA ${name} TYPE STANDARD TABLE OF ${uniqueName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n if (fieldDefinitions === \"\") {\r\n fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getStart(), `DATA ${name} TYPE STANDARD TABLE OF ${tableName} WITH DEFAULT KEY.\r\n${indentation}`);\r\n }\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, inlineData.getFirstToken().getStart(), inlineData.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, inlineData.getFirstToken(), \"Outline SELECT @DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n replaceAppendExpression(high, lowFile, highSyntax) {\r\n if (!(high.get() instanceof Statements.Append)) {\r\n return undefined;\r\n }\r\n const children = high.getChildren();\r\n if (children[1].get() instanceof Expressions.Source) {\r\n const source = children[1];\r\n const target = high.findDirectExpression(Expressions.Target);\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(high.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = high.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${target === null || target === void 0 ? void 0 : target.concatTokens()}.\r\n${indentation}${uniqueName} = ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, high.getFirstToken(), \"Outline APPEND source expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n replaceTableExpression(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const fieldChain of node.findAllExpressionsRecursive(Expressions.FieldChain)) {\r\n const tableExpression = fieldChain.findDirectExpression(Expressions.TableExpression);\r\n if (tableExpression === undefined) {\r\n continue;\r\n }\r\n if (tableExpression.getChildren().length > 3) {\r\n // for now, only support the INDEX scenario\r\n continue;\r\n }\r\n let pre = \"\";\r\n let startToken = undefined;\r\n for (const child of fieldChain.getChildren()) {\r\n if (startToken === undefined) {\r\n startToken = child.getFirstToken();\r\n }\r\n else if (child === tableExpression) {\r\n break;\r\n }\r\n pre += child.concatTokens();\r\n }\r\n if (startToken === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${uniqueName} LIKE LINE OF ${pre}.\r\n${indentation}READ TABLE ${pre} INDEX ${(_a = tableExpression.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()} INTO ${uniqueName}.\r\n${indentation}IF sy-subrc <> 0.\r\n${indentation} RAISE EXCEPTION TYPE cx_sy_itab_line_not_found.\r\n${indentation}ENDIF.\r\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, startToken.getStart(), tableExpression.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline table expression\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineDataSimple(node, lowFile) {\r\n // outlines \"DATA(ls_msg) = temp1.\", note that this does not need to look at types\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const target = node.findFirstExpression(Expressions.Target);\r\n if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {\r\n return undefined;\r\n }\r\n const source = node.findFirstExpression(Expressions.Source);\r\n if (source === undefined) {\r\n return undefined;\r\n }\r\n else if (source.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n else if (!(((_b = source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldOffset)) {\r\n return undefined;\r\n }\r\n else if (source.findFirstExpression(Expressions.FieldLength)) {\r\n return undefined;\r\n }\r\n const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const firstToken = node.getFirstToken();\r\n const lastToken = node.getLastToken();\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA ${targetName} LIKE ${source.concatTokens()}.\\n${indentation}`);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), `${targetName} = ${source.concatTokens()}.`);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n partiallyImplemented(node, lowFile) {\r\n if (node.get() instanceof Statements.InterfaceDef) {\r\n const partially = node.findDirectTokenByText(\"PARTIALLY\");\r\n if (partially === undefined) {\r\n return undefined;\r\n }\r\n const implemented = node.findDirectTokenByText(\"IMPLEMENTED\");\r\n if (implemented === undefined) {\r\n return undefined;\r\n }\r\n const fix = edit_helper_1.EditHelper.deleteRange(lowFile, partially.getStart(), implemented.getEnd());\r\n return issue_1.Issue.atToken(lowFile, partially, \"Downport PARTIALLY IMPLEMENTED\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n raiseException(node, lowFile, highSyntax) {\r\n /*\r\n Note: IF_T100_DYN_MSG does not exist in 702, so this rule is mostly relevant for the transpiler\r\n \r\n DATA foo LIKE if_t100_message=>t100key.\r\n foo-msgid = 'ZHVAM'.\r\n foo-msgno = '001'.\r\n foo-attr1 = 'IF_T100_DYN_MSG~MSGV1'.\r\n foo-attr2 = 'IF_T100_DYN_MSG~MSGV2'.\r\n foo-attr3 = 'IF_T100_DYN_MSG~MSGV3'.\r\n foo-attr4 = 'IF_T100_DYN_MSG~MSGV4'.\r\n DATA bar TYPE REF TO zcl_hvam_exception.\r\n CREATE OBJECT bar EXPORTING textid = foo.\r\n bar->if_t100_dyn_msg~msgty = 'E'.\r\n bar->if_t100_dyn_msg~msgv1 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv2 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv3 = 'abc'.\r\n bar->if_t100_dyn_msg~msgv4 = 'abc'.\r\n RAISE EXCEPTION bar.\r\n */\r\n var _a;\r\n if (node.get() instanceof Statements.Raise) {\r\n const startToken = node.findDirectTokenByText(\"ID\");\r\n if (startToken === undefined) {\r\n return undefined;\r\n }\r\n const sources = node.findDirectExpressions(Expressions.Source);\r\n const id = sources[0].concatTokens();\r\n const numberExpression = node.findExpressionAfterToken(\"NUMBER\");\r\n if (numberExpression === undefined) {\r\n throw \"downport raiseException, could not find number\";\r\n }\r\n let number = numberExpression.concatTokens();\r\n if (numberExpression.get() instanceof Expressions.MessageNumber) {\r\n number = \"'\" + number + \"'\";\r\n }\r\n const className = ((_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens()) || \"ERROR\";\r\n const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName1} LIKE if_t100_message=>t100key.\r\n${indentation}${uniqueName1}-msgid = ${id}.\r\n${indentation}${uniqueName1}-msgno = ${number}.\r\n${indentation}DATA ${uniqueName2} TYPE REF TO ${className}.\r\n${indentation}CREATE OBJECT ${uniqueName2} EXPORTING textid = ${uniqueName1}.\r\n${indentation}RAISE EXCEPTION ${uniqueName2}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);\r\n return issue_1.Issue.atToken(lowFile, startToken, \"Downport RAISE MESSAGE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n emptyKey(node, lowFile) {\r\n for (let i of node.findAllExpressions(Expressions.TypeTable)) {\r\n const key = i.findDirectExpression(Expressions.TypeTableKey);\r\n if (key === undefined) {\r\n continue;\r\n }\r\n i = key;\r\n const concat = i.concatTokens();\r\n if (concat.toUpperCase().includes(\"WITH EMPTY KEY\") === false) {\r\n continue;\r\n }\r\n const token = i.findDirectTokenByText(\"EMPTY\");\r\n if (token === undefined) {\r\n continue;\r\n }\r\n const fix = edit_helper_1.EditHelper.replaceToken(lowFile, token, \"DEFAULT\");\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport EMPTY KEY\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // must be very simple string templates, like \"|{ ls_line-no ALPHA = IN }|\"\r\n stringTemplateAlpha(node, lowFile) {\r\n var _a, _b, _c;\r\n if (!(node.get() instanceof Statements.Move)) {\r\n return undefined;\r\n }\r\n const topSource = node.findDirectExpression(Expressions.Source);\r\n if (topSource === undefined || topSource.getChildren().length !== 1) {\r\n return undefined;\r\n }\r\n const child = topSource.getFirstChild();\r\n if (!(child.get() instanceof Expressions.StringTemplate)) {\r\n return undefined;\r\n }\r\n const templateTokens = child.getChildren();\r\n if (templateTokens.length !== 3\r\n || templateTokens[0].getFirstToken().getStr() !== \"|{\"\r\n || templateTokens[2].getFirstToken().getStr() !== \"}|\") {\r\n return undefined;\r\n }\r\n const templateSource = child.findDirectExpression(Expressions.StringTemplateSource);\r\n const formatting = (_a = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.StringTemplateFormatting)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n let functionName = \"\";\r\n switch (formatting) {\r\n case \"ALPHA = IN\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_INPUT\";\r\n break;\r\n case \"ALPHA = OUT\":\r\n functionName = \"CONVERSION_EXIT_ALPHA_OUTPUT\";\r\n break;\r\n default:\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const source = (_b = templateSource === null || templateSource === void 0 ? void 0 : templateSource.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const topTarget = (_c = node.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n const code = `CALL FUNCTION '${functionName}'\r\n${indentation} EXPORTING\r\n${indentation} input = ${source}\r\n${indentation} IMPORTING\r\n${indentation} output = ${topTarget}.`;\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), code);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Downport ALPHA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopInput(node, lowFile, highSyntax) {\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n else if (node.findDirectExpression(Expressions.SimpleSource2)) {\r\n return undefined;\r\n }\r\n // the first Source must be outlined\r\n const s = node.findDirectExpression(Expressions.Source);\r\n if (s === undefined) {\r\n return undefined;\r\n }\r\n const uniqueName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const code = `DATA(${uniqueName}) = ${s.concatTokens()}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, s.getFirstToken().getStart(), s.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP input\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n outlineLoopTarget(node, lowFile, _highSyntax) {\r\n var _a, _b, _c, _d, _e;\r\n // also allows outlining of voided types\r\n if (!(node.get() instanceof Statements.Loop)) {\r\n return undefined;\r\n }\r\n const sourceName = (_a = node.findDirectExpression(Expressions.SimpleSource2)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (sourceName === undefined) {\r\n return undefined;\r\n }\r\n const concat = node.concatTokens();\r\n if (concat.includes(\" REFERENCE INTO \")) {\r\n return undefined;\r\n }\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const dataTarget = (_b = node.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);\r\n if (dataTarget) {\r\n const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, dataTarget.getFirstToken().getStart(), dataTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP data target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n const fsTarget = (_d = node.findDirectExpression(Expressions.FSTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.InlineFS);\r\n if (fsTarget) {\r\n const targetName = ((_e = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _e === void 0 ? void 0 : _e.concatTokens()) || \"DOWNPORT_ERROR\";\r\n const code = `FIELD-SYMBOLS ${targetName} LIKE LINE OF ${sourceName}.\\n${indentation}`;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Outline LOOP fs target\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineReduce(node, lowFile, highSyntax) {\r\n var _a, _b, _c, _d;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"REDUCE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n let name = \"\";\r\n const reduceBody = i.findDirectExpression(Expressions.ReduceBody);\r\n if (reduceBody === undefined) {\r\n continue;\r\n }\r\n for (const init of reduceBody.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n name = init.getFirstToken().getStr();\r\n body += indentation + `DATA(${name}) = ${(_a = reduceBody.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens()}.\\n`;\r\n }\r\n const loop = reduceBody.findFirstExpression(Expressions.InlineLoopDefinition);\r\n if (loop === undefined) {\r\n continue;\r\n }\r\n const loopSource = (_b = loop.findFirstExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n const loopTargetField = (_c = loop.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();\r\n if (loopTargetField) {\r\n body += indentation + `LOOP AT ${loopSource} INTO DATA(${loopTargetField}).\\n`;\r\n }\r\n if (loopTargetField === undefined) {\r\n const loopTargetFieldSymbol = (_d = loop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n }\r\n const next = reduceBody.findDirectExpression(Expressions.ReduceNext);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n for (const n of next.getChildren()) {\r\n if (n.concatTokens().toUpperCase() === \"NEXT\") {\r\n continue;\r\n }\r\n else if (n.concatTokens() === \"=\") {\r\n body += \" = \";\r\n }\r\n else if (n.get() instanceof Expressions.Field) {\r\n body += indentation + \" \" + n.concatTokens();\r\n }\r\n else if (n.get() instanceof Expressions.Source) {\r\n body += n.concatTokens() + \".\\n\";\r\n }\r\n }\r\n body += indentation + `ENDLOOP.\\n`;\r\n body += indentation + `${uniqueName} = ${name}.\\n`;\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport REDUCE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineValue(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n const allSources = node.findAllExpressionsRecursive(Expressions.Source);\r\n for (const i of allSources) {\r\n const firstToken = i.getFirstToken();\r\n if (firstToken.getStr().toUpperCase() !== \"VALUE\") {\r\n continue;\r\n }\r\n const type = this.findType(i, lowFile, highSyntax);\r\n if (type === undefined) {\r\n continue;\r\n }\r\n const valueBody = i.findDirectExpression(Expressions.ValueBody);\r\n const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n let indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n let body = \"\";\r\n const loop = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findFirstExpression(Expressions.InlineLoopDefinition);\r\n if (loop) {\r\n const loopSource = (_a = loop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const loopTargetFieldSymbol = (_b = loop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\\n`;\r\n indentation += \" \";\r\n }\r\n let structureName = uniqueName;\r\n let added = false;\r\n let data = \"\";\r\n for (const b of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {\r\n if (b.concatTokens() === \"(\" && added === false) {\r\n structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);\r\n data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\\n`;\r\n }\r\n if (b.get() instanceof Expressions.FieldAssignment) {\r\n if (added === false) {\r\n body += data;\r\n added = true;\r\n }\r\n body += indentation + structureName + \"-\" + b.concatTokens() + \".\\n\";\r\n }\r\n else if (b.get() instanceof Expressions.Source) {\r\n structureName = b.concatTokens();\r\n }\r\n else if (b instanceof nodes_1.ExpressionNode && b.get() instanceof Expressions.Let) {\r\n body += this.outlineLet(b, indentation, highSyntax, lowFile);\r\n }\r\n else if (b.concatTokens() === \")\") {\r\n body += indentation + `APPEND ${structureName} TO ${uniqueName}.\\n`;\r\n }\r\n }\r\n if (loop) {\r\n indentation = indentation.substr(2);\r\n body += indentation + `ENDLOOP.\\n`;\r\n }\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n body +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, firstToken, \"Downport VALUE\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineLet(node, indentation, highSyntax, lowFile) {\r\n var _a;\r\n let ret = \"\";\r\n for (const f of node.findDirectExpressions(Expressions.InlineFieldDefinition)) {\r\n const c = f.getFirstChild();\r\n if (c === undefined) {\r\n continue;\r\n }\r\n const name = c.concatTokens().toLowerCase();\r\n const spag = highSyntax.spaghetti.lookupPosition(c.getFirstToken().getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n const type = found.getType().getQualifiedName() ? (_a = found.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase() : found.getType().toABAP();\r\n ret += indentation + \"DATA \" + name + ` TYPE ${type}.\\n`;\r\n const source = f.findFirstExpression(Expressions.Source);\r\n if (source) {\r\n ret += indentation + name + ` = ${source.concatTokens()}.\\n`;\r\n }\r\n }\r\n return ret;\r\n }\r\n findType(i, lowFile, highSyntax) {\r\n var _a;\r\n const expr = i.findDirectExpression(Expressions.TypeNameOrInfer);\r\n if (expr === undefined) {\r\n return undefined;\r\n }\r\n const firstToken = expr.getFirstToken();\r\n const concat = expr.concatTokens().toLowerCase();\r\n if (concat !== \"#\") {\r\n return concat;\r\n }\r\n const spag = highSyntax.spaghetti.lookupPosition(firstToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n return undefined;\r\n }\r\n let inferred = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.InferredType\r\n && r.resolved\r\n && r.position.getStart().equals(firstToken.getStart())\r\n && r.resolved instanceof _typed_identifier_1.TypedIdentifier) {\r\n inferred = r.resolved;\r\n break;\r\n }\r\n }\r\n if (inferred === undefined) {\r\n return undefined;\r\n }\r\n return (_a = inferred.getType().getQualifiedName()) === null || _a === void 0 ? void 0 : _a.toLowerCase();\r\n }\r\n outlineFS(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineFS)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `FIELD-SYMBOLS ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline FIELD-SYMBOL\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineData(node, lowFile, highSyntax) {\r\n var _a, _b;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.InlineData)) {\r\n const nameToken = (_a = i.findDirectExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n continue;\r\n }\r\n const name = nameToken.getStr();\r\n const spag = highSyntax.spaghetti.lookupPosition(nameToken.getStart(), lowFile.getFilename());\r\n if (spag === undefined) {\r\n continue;\r\n }\r\n const found = spag.findVariable(name);\r\n if (found === undefined) {\r\n continue;\r\n }\r\n else if (found.getType() instanceof basic_1.VoidType) {\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Error outlining voided type\", this.getMetadata().key, this.conf.severity);\r\n }\r\n const type = found.getType().getQualifiedName() ? (_b = found.getType().getQualifiedName()) === null || _b === void 0 ? void 0 : _b.toLowerCase() : found.getType().toABAP();\r\n const code = `DATA ${name} TYPE ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), name);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Outline DATA\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n outlineCond(node, lowFile, highSyntax) {\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"COND\") {\r\n continue;\r\n }\r\n const body = i.findDirectExpression(Expressions.CondBody);\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const bodyCode = this.buildCondBody(body, uniqueName, indent);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` + bodyCode;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport COND\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n buildCondBody(body, uniqueName, indent) {\r\n let code = indent;\r\n for (const c of body.getChildren()) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n switch (c.getFirstToken().getStr().toUpperCase()) {\r\n case \"WHEN\":\r\n code += \"IF \";\r\n break;\r\n case \"THEN\":\r\n code += \".\\n\";\r\n break;\r\n case \"ELSE\":\r\n code += indent + \"ELSE.\\n\";\r\n break;\r\n default:\r\n throw \"buildCondBody, unexpected token\";\r\n }\r\n }\r\n else if (c.get() instanceof Expressions.Cond) {\r\n code += c.concatTokens();\r\n }\r\n else if (c.get() instanceof Expressions.Source) {\r\n code += indent + \" \" + uniqueName + \" = \" + c.concatTokens() + \".\\n\";\r\n }\r\n else {\r\n throw \"buildCondBody, unexpected expression\";\r\n }\r\n }\r\n code += indent + \"ENDIF.\\n\";\r\n code += indent;\r\n return code;\r\n }\r\n outlineConv(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {\r\n if (i.getFirstToken().getStr().toUpperCase() !== \"CONV\") {\r\n continue;\r\n }\r\n const body = (_a = i.findDirectExpression(Expressions.ConvBody)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (body === undefined) {\r\n continue;\r\n }\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const indent = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const abap = `DATA ${uniqueName} TYPE ${type}.\\n` +\r\n indent + `${uniqueName} = ${body}.\\n` +\r\n indent;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CONV\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n // \"CAST\" to \"?=\"\r\n outlineCast(node, lowFile, highSyntax) {\r\n var _a;\r\n for (const i of node.findAllExpressionsRecursive(Expressions.Cast)) {\r\n const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const type = this.findType(i, lowFile, highSyntax);\r\n const body = (_a = i.findDirectExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n const abap = `DATA ${uniqueName} TYPE REF TO ${type}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1) +\r\n `${uniqueName} ?= ${body}.\\n` +\r\n \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);\r\n const fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n return issue_1.Issue.atToken(lowFile, i.getFirstToken(), \"Downport CAST\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n return undefined;\r\n }\r\n uniqueName(position, filename, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(position, filename);\r\n if (spag === undefined) {\r\n return \"uniqueErrorSpag\";\r\n }\r\n while (true) {\r\n const name = \"temp\" + this.counter;\r\n const found = spag.findVariable(name);\r\n this.counter++;\r\n if (found === undefined) {\r\n return name;\r\n }\r\n }\r\n }\r\n replaceXsdBool(node, lowFile, highSyntax) {\r\n const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference\r\n && r.position.getName().toUpperCase() === \"XSDBOOL\") {\r\n const token = r.position.getToken();\r\n const fix = edit_helper_1.EditHelper.replaceRange(lowFile, token.getStart(), token.getEnd(), \"boolc\");\r\n return issue_1.Issue.atToken(lowFile, token, \"Use BOOLC\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n }\r\n return undefined;\r\n }\r\n newToCreateObject(node, lowFile, highSyntax) {\r\n const source = node.findDirectExpression(Expressions.Source);\r\n let fix = undefined;\r\n if (node.get() instanceof Statements.Move\r\n && source\r\n && source.getFirstToken().getStr().toUpperCase() === \"NEW\") {\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const found = source === null || source === void 0 ? void 0 : source.findFirstExpression(Expressions.NewObject);\r\n // must be at top level of the source for quickfix to work(todo: handle more scenarios)\r\n // todo, assumption: the target is not an inline definition\r\n if (target && found && source.concatTokens() === found.concatTokens()) {\r\n const abap = this.newParameters(found, target.concatTokens(), highSyntax, lowFile);\r\n if (abap !== undefined) {\r\n fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getFirstToken().getStart(), node.getLastToken().getEnd(), abap);\r\n }\r\n }\r\n }\r\n if (fix === undefined && node.findAllExpressions(Expressions.NewObject)) {\r\n const found = node.findFirstExpression(Expressions.NewObject);\r\n if (found === undefined) {\r\n return undefined;\r\n }\r\n const name = this.uniqueName(found.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);\r\n const abap = this.newParameters(found, name, highSyntax, lowFile);\r\n if (abap === undefined) {\r\n return undefined;\r\n }\r\n const type = this.findType(found, lowFile, highSyntax);\r\n const indentation = \" \".repeat(node.getFirstToken().getStart().getCol() - 1);\r\n const data = `DATA ${name} TYPE REF TO ${type}.\\n` +\r\n indentation + abap + \"\\n\" +\r\n indentation;\r\n const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), data);\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, found.getFirstToken().getStart(), found.getLastToken().getEnd(), name);\r\n fix = edit_helper_1.EditHelper.merge(fix2, fix1);\r\n }\r\n if (fix) {\r\n return issue_1.Issue.atToken(lowFile, node.getFirstToken(), \"Use CREATE OBJECT instead of NEW\", this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n else {\r\n return undefined;\r\n }\r\n }\r\n newParameters(found, name, highSyntax, lowFile) {\r\n var _a, _b, _c;\r\n const typeToken = (_a = found.findDirectExpression(Expressions.TypeNameOrInfer)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n let extra = (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr()) === \"#\" ? \"\" : \" TYPE \" + (typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr());\r\n const parameters = found.findFirstExpression(Expressions.ParameterListS);\r\n if (parameters) {\r\n extra = parameters ? extra + \" EXPORTING \" + parameters.concatTokens() : extra;\r\n }\r\n else if (typeToken) {\r\n const source = (_b = found.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.concatTokens();\r\n if (source) {\r\n // find the default parameter name for the constructor\r\n const spag = highSyntax.spaghetti.lookupPosition(typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStart(), lowFile.getFilename());\r\n let cdef = undefined;\r\n for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {\r\n if ((r.referenceType === _reference_1.ReferenceType.InferredType\r\n || r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference)\r\n && r.resolved && r.position.getStart().equals(typeToken.getStart())) {\r\n cdef = r.resolved;\r\n }\r\n }\r\n if (cdef && cdef.getMethodDefinitions === undefined) {\r\n return undefined; // something wrong\r\n }\r\n const importing = (_c = cdef === null || cdef === void 0 ? void 0 : cdef.getMethodDefinitions().getByName(\"CONSTRUCTOR\")) === null || _c === void 0 ? void 0 : _c.getParameters().getDefaultImporting();\r\n if (importing) {\r\n extra += \" EXPORTING \" + importing + \" = \" + source;\r\n }\r\n else if (spag === undefined) {\r\n extra += \" SpagUndefined\";\r\n }\r\n else if (cdef === undefined) {\r\n extra += \" ClassDefinitionNotFound\";\r\n }\r\n else {\r\n extra += \" SomeError\";\r\n }\r\n }\r\n }\r\n const abap = `CREATE OBJECT ${name}${extra}.`;\r\n return abap;\r\n }\r\n}\r\nexports.Downport = Downport;\r\n//# sourceMappingURL=downport.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/downport.js?");
11603
11614
 
11604
11615
  /***/ }),
11605
11616
 
@@ -11643,7 +11654,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11643
11654
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11644
11655
 
11645
11656
  "use strict";
11646
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExitOrCheck = exports.ExitOrCheckConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ExitOrCheckConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.allowExit = false;\r\n this.allowCheck = false;\r\n }\r\n}\r\nexports.ExitOrCheckConf = ExitOrCheckConf;\r\nclass ExitOrCheck extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ExitOrCheckConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"exit_or_check\",\r\n title: \"Find EXIT or CHECK outside loops\",\r\n shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.\nUse RETURN to leave procesing blocks instead.`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm\nhttps://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stack = [];\r\n for (const statement of file.getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof Statements.Loop\r\n || get instanceof Statements.While\r\n || get instanceof Statements.SelectLoop\r\n || get instanceof Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof Statements.EndLoop\r\n || get instanceof Statements.EndWhile\r\n || get instanceof Statements.EndSelect\r\n || get instanceof Statements.EndDo) {\r\n stack.pop();\r\n }\r\n else if (this.conf.allowCheck === false && get instanceof Statements.Check && stack.length === 0) {\r\n const message = \"CHECK is not allowed outside of loops\";\r\n let tokensString = statement.concatTokens();\r\n tokensString = tokensString.slice(statement.getFirstToken().getEnd().getCol());\r\n const replacement = \"IF NOT \" + tokensString + \"\\n RETURN.\\nENDIF.\";\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, statement.getFirstToken().getStart(), statement.getLastToken().getEnd(), replacement);\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n else if (this.conf.allowExit === false && get instanceof Statements.Exit && stack.length === 0) {\r\n const message = \"EXIT is not allowed outside of loops\";\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, statement.getFirstToken(), \"RETURN\");\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ExitOrCheck = ExitOrCheck;\r\n//# sourceMappingURL=exit_or_check.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/exit_or_check.js?");
11657
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ExitOrCheck = exports.ExitOrCheckConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ExitOrCheckConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.allowExit = false;\r\n this.allowCheck = false;\r\n }\r\n}\r\nexports.ExitOrCheckConf = ExitOrCheckConf;\r\nclass ExitOrCheck extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ExitOrCheckConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"exit_or_check\",\r\n title: \"Find EXIT or CHECK outside loops\",\r\n shortDescription: `Detects usages of EXIT or CHECK statements outside of loops.\r\nUse RETURN to leave procesing blocks instead.`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abenleave_processing_blocks.htm\r\nhttps://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapcheck_processing_blocks.htm\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-return`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const stack = [];\r\n for (const statement of file.getStatements()) {\r\n const get = statement.get();\r\n if (get instanceof Statements.Loop\r\n || get instanceof Statements.While\r\n || get instanceof Statements.SelectLoop\r\n || get instanceof Statements.Do) {\r\n stack.push(statement);\r\n }\r\n else if (get instanceof Statements.EndLoop\r\n || get instanceof Statements.EndWhile\r\n || get instanceof Statements.EndSelect\r\n || get instanceof Statements.EndDo) {\r\n stack.pop();\r\n }\r\n else if (this.conf.allowCheck === false && get instanceof Statements.Check && stack.length === 0) {\r\n const message = \"CHECK is not allowed outside of loops\";\r\n let tokensString = statement.concatTokens();\r\n tokensString = tokensString.slice(statement.getFirstToken().getEnd().getCol());\r\n const replacement = \"IF NOT \" + tokensString + \"\\n RETURN.\\nENDIF.\";\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, statement.getFirstToken().getStart(), statement.getLastToken().getEnd(), replacement);\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n else if (this.conf.allowExit === false && get instanceof Statements.Exit && stack.length === 0) {\r\n const message = \"EXIT is not allowed outside of loops\";\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, statement.getFirstToken(), \"RETURN\");\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ExitOrCheck = ExitOrCheck;\r\n//# sourceMappingURL=exit_or_check.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/exit_or_check.js?");
11647
11658
 
11648
11659
  /***/ }),
11649
11660
 
@@ -11654,7 +11665,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11654
11665
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11655
11666
 
11656
11667
  "use strict";
11657
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Exporting = exports.ExportingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ExportingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ExportingConf = ExportingConf;\r\nclass Exporting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ExportingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"exporting\",\r\n title: \"EXPORTING can be omitted\",\r\n shortDescription: `Detects EXPORTING statements which can be omitted.`,\r\n badExample: `call_method( EXPORTING foo = bar ).`,\r\n goodExample: `call_method( foo = bar ).`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting\nhttps://docs.abapopenchecks.org/checks/30/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"The EXPORTING keyword can be omitted\";\r\n }\r\n runParsed(file, obj) {\r\n let issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n const expressions = statement.findAllExpressionsMulti([expressions_1.MethodCallBody, expressions_1.MethodCall]);\r\n for (const b of expressions) {\r\n if (b.get() instanceof expressions_1.MethodCallBody) {\r\n if (b.getFirstToken().getStr() !== \"(\") {\r\n continue;\r\n }\r\n issues = issues.concat(this.check(b, file));\r\n }\r\n else if (b.get() instanceof expressions_1.MethodCall) {\r\n issues = issues.concat(this.check(b, file));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n check(node, file) {\r\n const e = node.findFirstExpression(expressions_1.MethodParameters);\r\n if (e === undefined) {\r\n return [];\r\n }\r\n if (e.getFirstToken().getStr().toUpperCase() !== \"EXPORTING\") {\r\n return [];\r\n }\r\n const tokens = e.getDirectTokens();\r\n const strings = tokens.map(t => t.getStr().toUpperCase());\r\n if (strings[0] === \"EXPORTING\"\r\n && strings.includes(\"IMPORTING\") === false\r\n && strings.includes(\"RECEIVING\") === false\r\n && strings.includes(\"EXCEPTIONS\") === false\r\n && strings.includes(\"CHANGING\") === false) {\r\n const next = e.getAllTokens()[1];\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, tokens[0].getStart(), next.getStart());\r\n const issue = issue_1.Issue.atToken(file, tokens[0], this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.Exporting = Exporting;\r\n//# sourceMappingURL=exporting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/exporting.js?");
11668
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Exporting = exports.ExportingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ExportingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ExportingConf = ExportingConf;\r\nclass Exporting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ExportingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"exporting\",\r\n title: \"EXPORTING can be omitted\",\r\n shortDescription: `Detects EXPORTING statements which can be omitted.`,\r\n badExample: `call_method( EXPORTING foo = bar ).`,\r\n goodExample: `call_method( foo = bar ).`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-optional-keyword-exporting\r\nhttps://docs.abapopenchecks.org/checks/30/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"The EXPORTING keyword can be omitted\";\r\n }\r\n runParsed(file, obj) {\r\n let issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n const expressions = statement.findAllExpressionsMulti([expressions_1.MethodCallBody, expressions_1.MethodCall]);\r\n for (const b of expressions) {\r\n if (b.get() instanceof expressions_1.MethodCallBody) {\r\n if (b.getFirstToken().getStr() !== \"(\") {\r\n continue;\r\n }\r\n issues = issues.concat(this.check(b, file));\r\n }\r\n else if (b.get() instanceof expressions_1.MethodCall) {\r\n issues = issues.concat(this.check(b, file));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n check(node, file) {\r\n const e = node.findFirstExpression(expressions_1.MethodParameters);\r\n if (e === undefined) {\r\n return [];\r\n }\r\n if (e.getFirstToken().getStr().toUpperCase() !== \"EXPORTING\") {\r\n return [];\r\n }\r\n const tokens = e.getDirectTokens();\r\n const strings = tokens.map(t => t.getStr().toUpperCase());\r\n if (strings[0] === \"EXPORTING\"\r\n && strings.includes(\"IMPORTING\") === false\r\n && strings.includes(\"RECEIVING\") === false\r\n && strings.includes(\"EXCEPTIONS\") === false\r\n && strings.includes(\"CHANGING\") === false) {\r\n const next = e.getAllTokens()[1];\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, tokens[0].getStart(), next.getStart());\r\n const issue = issue_1.Issue.atToken(file, tokens[0], this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.Exporting = Exporting;\r\n//# sourceMappingURL=exporting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/exporting.js?");
11658
11669
 
11659
11670
  /***/ }),
11660
11671
 
@@ -11665,7 +11676,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11665
11676
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11666
11677
 
11667
11678
  "use strict";
11668
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ForbiddenIdentifier = exports.ForbiddenIdentifierConf = void 0;\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass ForbiddenIdentifierConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of forbideen identifiers, array of string regex\r\n * @uniqueItems true\r\n */\r\n this.check = [];\r\n }\r\n}\r\nexports.ForbiddenIdentifierConf = ForbiddenIdentifierConf;\r\nclass ForbiddenIdentifier extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ForbiddenIdentifierConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"forbidden_identifier\",\r\n title: \"Forbidden Identifier\",\r\n shortDescription: `Forbid use of specified identifiers, list of regex.`,\r\n extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,\nhttps://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.check === undefined) {\r\n this.conf.check = [];\r\n }\r\n }\r\n runParsed(file) {\r\n if (this.conf.check.length === 0) {\r\n return [];\r\n }\r\n let ret = [];\r\n for (const s of file.getStatements()) {\r\n ret = ret.concat(this.traverse(s, file));\r\n }\r\n return ret;\r\n }\r\n traverse(node, file) {\r\n let ret = [];\r\n for (const c of node.getChildren()) {\r\n if (c instanceof nodes_1.TokenNodeRegex) {\r\n ret = ret.concat(this.check(c.get(), file));\r\n }\r\n else if (c instanceof nodes_1.TokenNode) {\r\n continue;\r\n }\r\n else {\r\n ret = ret.concat(this.traverse(c, file));\r\n }\r\n }\r\n return ret;\r\n }\r\n check(token, file) {\r\n const str = token.getStr();\r\n const ret = [];\r\n for (const c of this.conf.check) {\r\n const reg = new RegExp(c, \"i\");\r\n if (reg.exec(str)) {\r\n const message = \"Identifer \\\"\" + str + \"\\\" not allowed\";\r\n ret.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ForbiddenIdentifier = ForbiddenIdentifier;\r\n//# sourceMappingURL=forbidden_identifier.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js?");
11679
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ForbiddenIdentifier = exports.ForbiddenIdentifierConf = void 0;\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass ForbiddenIdentifierConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of forbideen identifiers, array of string regex\r\n * @uniqueItems true\r\n */\r\n this.check = [];\r\n }\r\n}\r\nexports.ForbiddenIdentifierConf = ForbiddenIdentifierConf;\r\nclass ForbiddenIdentifier extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ForbiddenIdentifierConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"forbidden_identifier\",\r\n title: \"Forbidden Identifier\",\r\n shortDescription: `Forbid use of specified identifiers, list of regex.`,\r\n extendedInformation: `Used in the transpiler to find javascript keywords in ABAP identifiers,\r\nhttps://github.com/abaplint/transpiler/blob/bda94b8b56e2b7f2f87be2168f12361aa530220e/packages/transpiler/src/validation.ts#L44`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.check === undefined) {\r\n this.conf.check = [];\r\n }\r\n }\r\n runParsed(file) {\r\n if (this.conf.check.length === 0) {\r\n return [];\r\n }\r\n let ret = [];\r\n for (const s of file.getStatements()) {\r\n ret = ret.concat(this.traverse(s, file));\r\n }\r\n return ret;\r\n }\r\n traverse(node, file) {\r\n let ret = [];\r\n for (const c of node.getChildren()) {\r\n if (c instanceof nodes_1.TokenNodeRegex) {\r\n ret = ret.concat(this.check(c.get(), file));\r\n }\r\n else if (c instanceof nodes_1.TokenNode) {\r\n continue;\r\n }\r\n else {\r\n ret = ret.concat(this.traverse(c, file));\r\n }\r\n }\r\n return ret;\r\n }\r\n check(token, file) {\r\n const str = token.getStr();\r\n const ret = [];\r\n for (const c of this.conf.check) {\r\n const reg = new RegExp(c, \"i\");\r\n if (reg.exec(str)) {\r\n const message = \"Identifer \\\"\" + str + \"\\\" not allowed\";\r\n ret.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ForbiddenIdentifier = ForbiddenIdentifier;\r\n//# sourceMappingURL=forbidden_identifier.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js?");
11669
11680
 
11670
11681
  /***/ }),
11671
11682
 
@@ -11687,7 +11698,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11687
11698
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11688
11699
 
11689
11700
  "use strict";
11690
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ForbiddenVoidType = exports.ForbiddenVoidTypeConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst void_type_1 = __webpack_require__(/*! ../abap/types/basic/void_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ForbiddenVoidTypeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of forbidden void types, array of string regex, case in-sensitive\r\n * @uniqueItems true\r\n */\r\n this.check = [];\r\n }\r\n}\r\nexports.ForbiddenVoidTypeConf = ForbiddenVoidTypeConf;\r\nclass ForbiddenVoidType {\r\n constructor() {\r\n this.conf = new ForbiddenVoidTypeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"forbidden_void_type\",\r\n title: \"Forbidden Void Types\",\r\n shortDescription: `Avoid usage of specified void types.`,\r\n extendedInformation: `Inspiration:\nBOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,\nDATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.check === undefined) {\r\n this.conf.check = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || this.conf.check.length === 0) {\r\n return [];\r\n }\r\n return this.traverse(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n ///////////////\r\n traverse(node) {\r\n var _a, _b, _c;\r\n let ret = [];\r\n const message = \"Forbidden void type: \";\r\n if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedVoidReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) !== undefined\r\n && this.isForbiddenName((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooName)) {\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + ((_c = r.extra) === null || _c === void 0 ? void 0 : _c.ooName), this.getMetadata().key, this.conf.severity));\r\n }\r\n if ((r.referenceType === _reference_1.ReferenceType.VoidType\r\n || r.referenceType === _reference_1.ReferenceType.TableVoidReference)\r\n && this.isForbiddenName(r.position.getName())) {\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + r.position.getName(), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.traverse(c));\r\n }\r\n return ret;\r\n }\r\n isForbiddenType(type) {\r\n if (type instanceof basic_1.StructureType) {\r\n return type.getComponents().some(c => this.isForbiddenType(c.type));\r\n }\r\n else if (!(type instanceof void_type_1.VoidType)) {\r\n return false;\r\n }\r\n const name = type.getVoided();\r\n return this.isForbiddenName(name);\r\n }\r\n isForbiddenName(name) {\r\n if (name === undefined) {\r\n return false;\r\n }\r\n for (const c of this.conf.check) {\r\n const reg = new RegExp(c, \"i\");\r\n const match = reg.test(name);\r\n if (match === true) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.ForbiddenVoidType = ForbiddenVoidType;\r\n//# sourceMappingURL=forbidden_void_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js?");
11701
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ForbiddenVoidType = exports.ForbiddenVoidTypeConf = void 0;\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst void_type_1 = __webpack_require__(/*! ../abap/types/basic/void_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ForbiddenVoidTypeConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of forbidden void types, array of string regex, case in-sensitive\r\n * @uniqueItems true\r\n */\r\n this.check = [];\r\n }\r\n}\r\nexports.ForbiddenVoidTypeConf = ForbiddenVoidTypeConf;\r\nclass ForbiddenVoidType {\r\n constructor() {\r\n this.conf = new ForbiddenVoidTypeConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"forbidden_void_type\",\r\n title: \"Forbidden Void Types\",\r\n shortDescription: `Avoid usage of specified void types.`,\r\n extendedInformation: `Inspiration:\r\nBOOLEAN, BOOLE_D, CHAR01, CHAR1, CHAR10, CHAR12, CHAR128, CHAR2, CHAR20, CHAR4, CHAR70,\r\nDATS, TIMS, DATUM, FLAG, INT4, NUMC3, NUMC4, SAP_BOOL, TEXT25, TEXT80, X255, XFELD`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.check === undefined) {\r\n this.conf.check = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || this.conf.check.length === 0) {\r\n return [];\r\n }\r\n return this.traverse(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n ///////////////\r\n traverse(node) {\r\n var _a, _b, _c;\r\n let ret = [];\r\n const message = \"Forbidden void type: \";\r\n if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedVoidReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName) !== undefined\r\n && this.isForbiddenName((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooName)) {\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + ((_c = r.extra) === null || _c === void 0 ? void 0 : _c.ooName), this.getMetadata().key, this.conf.severity));\r\n }\r\n if ((r.referenceType === _reference_1.ReferenceType.VoidType\r\n || r.referenceType === _reference_1.ReferenceType.TableVoidReference)\r\n && this.isForbiddenName(r.position.getName())) {\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + r.position.getName(), this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.traverse(c));\r\n }\r\n return ret;\r\n }\r\n isForbiddenType(type) {\r\n if (type instanceof basic_1.StructureType) {\r\n return type.getComponents().some(c => this.isForbiddenType(c.type));\r\n }\r\n else if (!(type instanceof void_type_1.VoidType)) {\r\n return false;\r\n }\r\n const name = type.getVoided();\r\n return this.isForbiddenName(name);\r\n }\r\n isForbiddenName(name) {\r\n if (name === undefined) {\r\n return false;\r\n }\r\n for (const c of this.conf.check) {\r\n const reg = new RegExp(c, \"i\");\r\n const match = reg.test(name);\r\n if (match === true) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.ForbiddenVoidType = ForbiddenVoidType;\r\n//# sourceMappingURL=forbidden_void_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js?");
11691
11702
 
11692
11703
  /***/ }),
11693
11704
 
@@ -11731,7 +11742,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11731
11742
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11732
11743
 
11733
11744
  "use strict";
11734
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FunctionalWriting = exports.FunctionalWritingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass FunctionalWritingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore functional writing in exception classes, local + global */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.FunctionalWritingConf = FunctionalWritingConf;\r\nclass FunctionalWriting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new FunctionalWritingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"functional_writing\",\r\n title: \"Use functional writing\",\r\n shortDescription: `Detects usage of call method when functional style calls can be used.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls\nhttps://docs.abapopenchecks.org/checks/07/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `CALL METHOD zcl_class=>method( ).\nCALL METHOD cl_abap_typedescr=>describe_by_name\n EXPORTING\n p_name = 'NAME'\n RECEIVING\n p_descr_ref = lr_typedescr\n EXCEPTIONS\n type_not_found = 1\n OTHERS = 2.`,\r\n goodExample: `zcl_class=>method( ).\ncl_abap_typedescr=>describe_by_name(\n EXPORTING\n p_name = 'NAME'\n RECEIVING\n p_descr_ref = lr_typedescr\n EXCEPTIONS\n type_not_found = 1\n OTHERS = 2 ).`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Use functional writing style for method calls\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a, _b;\r\n const issues = [];\r\n let exception = false;\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n let definition = undefined;\r\n if (obj instanceof objects_1.Class) {\r\n definition = obj.getClassDefinition();\r\n }\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const statNode of file.getStatements()) {\r\n if (statNode.get() instanceof Statements.ClassImplementation\r\n && definition\r\n && ddic.isException(definition, obj)\r\n && this.conf.ignoreExceptions) {\r\n exception = true;\r\n }\r\n else if (statNode.get() instanceof Statements.EndClass) {\r\n exception = false;\r\n }\r\n else if (exception === false && statNode.get() instanceof Statements.Call) {\r\n if (((_a = statNode.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.MethodCallChain) {\r\n continue;\r\n }\r\n const dynamic = (_b = statNode.findDirectExpression(Expressions.MethodSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic);\r\n if (dynamic !== undefined) {\r\n continue;\r\n }\r\n issues.push(this.createIssueForStatementNode(file, statNode));\r\n }\r\n }\r\n return issues;\r\n }\r\n createIssueForStatementNode(file, statNode) {\r\n const fixString = this.buildFixString(statNode);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, statNode.getStart(), statNode.getEnd(), fixString);\r\n return issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n buildFixString(statNode) {\r\n // Note: line breaks from source are lost\r\n const methodSource = statNode.findDirectExpression(Expressions.MethodSource);\r\n let methodSourceStr = methodSource === null || methodSource === void 0 ? void 0 : methodSource.concatTokens();\r\n const methodBody = statNode.findDirectExpression(Expressions.MethodCallBody);\r\n let methodBodyStr = \"\";\r\n if (methodBody) {\r\n const methodCallParam = methodBody.findDirectExpression(Expressions.MethodCallParam);\r\n if (methodCallParam && methodCallParam.getFirstToken().getStr() === \"(\") {\r\n // has parameters and parantheses\r\n methodBodyStr = `${methodBody.concatTokens()}.`;\r\n }\r\n else {\r\n // has parameters, but parentheses are missing\r\n methodSourceStr = `${methodSourceStr}( `;\r\n methodBodyStr = `${methodBody.concatTokens()} ).`;\r\n }\r\n }\r\n else {\r\n // no body means no parentheses and no parameters\r\n methodBodyStr = \"( ).\";\r\n }\r\n return methodSourceStr + methodBodyStr;\r\n }\r\n}\r\nexports.FunctionalWriting = FunctionalWriting;\r\n//# sourceMappingURL=functional_writing.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/functional_writing.js?");
11745
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.FunctionalWriting = exports.FunctionalWritingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass FunctionalWritingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore functional writing in exception classes, local + global */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.FunctionalWritingConf = FunctionalWritingConf;\r\nclass FunctionalWriting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new FunctionalWritingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"functional_writing\",\r\n title: \"Use functional writing\",\r\n shortDescription: `Detects usage of call method when functional style calls can be used.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-calls\r\nhttps://docs.abapopenchecks.org/checks/07/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `CALL METHOD zcl_class=>method( ).\r\nCALL METHOD cl_abap_typedescr=>describe_by_name\r\n EXPORTING\r\n p_name = 'NAME'\r\n RECEIVING\r\n p_descr_ref = lr_typedescr\r\n EXCEPTIONS\r\n type_not_found = 1\r\n OTHERS = 2.`,\r\n goodExample: `zcl_class=>method( ).\r\ncl_abap_typedescr=>describe_by_name(\r\n EXPORTING\r\n p_name = 'NAME'\r\n RECEIVING\r\n p_descr_ref = lr_typedescr\r\n EXCEPTIONS\r\n type_not_found = 1\r\n OTHERS = 2 ).`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Use functional writing style for method calls\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a, _b;\r\n const issues = [];\r\n let exception = false;\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n let definition = undefined;\r\n if (obj instanceof objects_1.Class) {\r\n definition = obj.getClassDefinition();\r\n }\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const statNode of file.getStatements()) {\r\n if (statNode.get() instanceof Statements.ClassImplementation\r\n && definition\r\n && ddic.isException(definition, obj)\r\n && this.conf.ignoreExceptions) {\r\n exception = true;\r\n }\r\n else if (statNode.get() instanceof Statements.EndClass) {\r\n exception = false;\r\n }\r\n else if (exception === false && statNode.get() instanceof Statements.Call) {\r\n if (((_a = statNode.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.MethodCallChain) {\r\n continue;\r\n }\r\n const dynamic = (_b = statNode.findDirectExpression(Expressions.MethodSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Dynamic);\r\n if (dynamic !== undefined) {\r\n continue;\r\n }\r\n issues.push(this.createIssueForStatementNode(file, statNode));\r\n }\r\n }\r\n return issues;\r\n }\r\n createIssueForStatementNode(file, statNode) {\r\n const fixString = this.buildFixString(statNode);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, statNode.getStart(), statNode.getEnd(), fixString);\r\n return issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n }\r\n buildFixString(statNode) {\r\n // Note: line breaks from source are lost\r\n const methodSource = statNode.findDirectExpression(Expressions.MethodSource);\r\n let methodSourceStr = methodSource === null || methodSource === void 0 ? void 0 : methodSource.concatTokens();\r\n const methodBody = statNode.findDirectExpression(Expressions.MethodCallBody);\r\n let methodBodyStr = \"\";\r\n if (methodBody) {\r\n const methodCallParam = methodBody.findDirectExpression(Expressions.MethodCallParam);\r\n if (methodCallParam && methodCallParam.getFirstToken().getStr() === \"(\") {\r\n // has parameters and parantheses\r\n methodBodyStr = `${methodBody.concatTokens()}.`;\r\n }\r\n else {\r\n // has parameters, but parentheses are missing\r\n methodSourceStr = `${methodSourceStr}( `;\r\n methodBodyStr = `${methodBody.concatTokens()} ).`;\r\n }\r\n }\r\n else {\r\n // no body means no parentheses and no parameters\r\n methodBodyStr = \"( ).\";\r\n }\r\n return methodSourceStr + methodBodyStr;\r\n }\r\n}\r\nexports.FunctionalWriting = FunctionalWriting;\r\n//# sourceMappingURL=functional_writing.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/functional_writing.js?");
11735
11746
 
11736
11747
  /***/ }),
11737
11748
 
@@ -11742,7 +11753,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11742
11753
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11743
11754
 
11744
11755
  "use strict";
11745
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.GlobalClass = exports.GlobalClassConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Objects = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass GlobalClassConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.GlobalClassConf = GlobalClassConf;\r\nclass GlobalClass extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new GlobalClassConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"global_class\",\r\n title: \"Global class checks\",\r\n shortDescription: `Checks related to global classes.\n\n* global classes must be in own files\n\n* file names must match class name\n\n* file names must match interface name\n\n* global classes must be global definitions\n\n* global interfaces must be global definitions`,\r\n tags: [_irule_1.RuleTag.Syntax],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const output = [];\r\n for (const definition of file.getInfo().listClassDefinitions()) {\r\n if (definition.isLocal && obj instanceof Objects.Class && file.getFilename().match(/\\.clas\\.abap$/)) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Global classes must be global\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n if (definition.isGlobal && obj instanceof Objects.Class && definition.name.toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Class definition name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n if (definition.isGlobal && !(obj instanceof Objects.Class)) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Class must be local\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const impl of file.getInfo().listClassImplementations()) {\r\n if (file.getFilename().match(/\\.clas\\.abap$/)\r\n && obj instanceof Objects.Class\r\n && impl.identifier.getName().toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, \"Class implementation name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const impl of file.getInfo().listInterfaceDefinitions()) {\r\n if (file.getFilename().match(/\\.intf\\.abap$/)\r\n && obj instanceof Objects.Interface\r\n && impl.identifier.getName().toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, \"Interface implementation name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const intf of file.getInfo().listInterfaceDefinitions()) {\r\n if (intf.isLocal && obj instanceof Objects.Interface && file.getFilename().match(/\\.intf\\.abap$/)) {\r\n const issue = issue_1.Issue.atIdentifier(intf.identifier, \"Global interface must be global\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.GlobalClass = GlobalClass;\r\n//# sourceMappingURL=global_class.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/global_class.js?");
11756
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.GlobalClass = exports.GlobalClassConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Objects = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass GlobalClassConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.GlobalClassConf = GlobalClassConf;\r\nclass GlobalClass extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new GlobalClassConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"global_class\",\r\n title: \"Global class checks\",\r\n shortDescription: `Checks related to global classes.\r\n\r\n* global classes must be in own files\r\n\r\n* file names must match class name\r\n\r\n* file names must match interface name\r\n\r\n* global classes must be global definitions\r\n\r\n* global interfaces must be global definitions`,\r\n tags: [_irule_1.RuleTag.Syntax],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const output = [];\r\n for (const definition of file.getInfo().listClassDefinitions()) {\r\n if (definition.isLocal && obj instanceof Objects.Class && file.getFilename().match(/\\.clas\\.abap$/)) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Global classes must be global\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n if (definition.isGlobal && obj instanceof Objects.Class && definition.name.toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Class definition name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n if (definition.isGlobal && !(obj instanceof Objects.Class)) {\r\n const issue = issue_1.Issue.atIdentifier(definition.identifier, \"Class must be local\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const impl of file.getInfo().listClassImplementations()) {\r\n if (file.getFilename().match(/\\.clas\\.abap$/)\r\n && obj instanceof Objects.Class\r\n && impl.identifier.getName().toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, \"Class implementation name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const impl of file.getInfo().listInterfaceDefinitions()) {\r\n if (file.getFilename().match(/\\.intf\\.abap$/)\r\n && obj instanceof Objects.Interface\r\n && impl.identifier.getName().toUpperCase() !== obj.getName().toUpperCase()) {\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, \"Interface implementation name must match filename\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n for (const intf of file.getInfo().listInterfaceDefinitions()) {\r\n if (intf.isLocal && obj instanceof Objects.Interface && file.getFilename().match(/\\.intf\\.abap$/)) {\r\n const issue = issue_1.Issue.atIdentifier(intf.identifier, \"Global interface must be global\", this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.GlobalClass = GlobalClass;\r\n//# sourceMappingURL=global_class.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/global_class.js?");
11746
11757
 
11747
11758
  /***/ }),
11748
11759
 
@@ -11753,7 +11764,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11753
11764
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11754
11765
 
11755
11766
  "use strict";
11756
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalConditions = exports.IdenticalConditionsConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nclass Conditions {\r\n constructor() {\r\n this.arr = [];\r\n this.arr = [];\r\n }\r\n push(e) {\r\n this.arr.push(e.concatTokens());\r\n }\r\n hasDuplicates() {\r\n return this.arr.some(x => this.arr.indexOf(x) !== this.arr.lastIndexOf(x));\r\n }\r\n}\r\nclass IdenticalConditionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalConditionsConf = IdenticalConditionsConf;\r\nclass IdenticalConditions extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IdenticalConditionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_conditions\",\r\n title: \"Identical conditions\",\r\n shortDescription: `Find identical conditions in IF + CASE + WHILE etc\n\nPrerequsites: code is pretty printed with identical cAsE`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n let issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const i of structure.findAllStructures(Structures.If)) {\r\n issues = issues.concat(this.analyzeIf(file, i));\r\n }\r\n for (const i of structure.findAllStructures(Structures.Case)) {\r\n issues = issues.concat(this.analyzeWhen(file, i));\r\n }\r\n for (const i of structure.findAllExpressions(Expressions.Cond)) {\r\n issues = issues.concat(this.analyzeCond(file, i));\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n analyzeCond(file, node) {\r\n const conditions = new Conditions();\r\n let operator = \"\";\r\n for (const c of node.getChildren()) {\r\n if (c instanceof nodes_1.ExpressionNode) {\r\n conditions.push(c);\r\n }\r\n else if (operator === \"\") {\r\n operator = c.get().getStr().toUpperCase();\r\n }\r\n else if (operator !== c.get().getStr().toUpperCase()) {\r\n return [];\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n analyzeIf(file, node) {\r\n var _a;\r\n const conditions = new Conditions();\r\n const i = node.findDirectStatement(Statements.If);\r\n if (i === undefined) {\r\n throw new Error(\"identical_conditions, no IF found\");\r\n }\r\n const c = i === null || i === void 0 ? void 0 : i.findDirectExpression(Expressions.Cond);\r\n if (c) {\r\n conditions.push(c);\r\n }\r\n for (const e of node.findDirectStructures(Structures.ElseIf)) {\r\n const c = (_a = e.findDirectStatement(Statements.ElseIf)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Cond);\r\n if (c) {\r\n conditions.push(c);\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n analyzeWhen(file, node) {\r\n const conditions = new Conditions();\r\n const i = node.findDirectStatement(Statements.Case);\r\n if (i === undefined) {\r\n throw new Error(\"identical_conditions, no CASE found\");\r\n }\r\n for (const e of node.findDirectStructures(Structures.When)) {\r\n const w = e.findDirectStatement(Statements.When);\r\n if (w === undefined) {\r\n continue;\r\n }\r\n for (const s of w.findAllExpressions(Expressions.Source)) {\r\n conditions.push(s);\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.IdenticalConditions = IdenticalConditions;\r\n//# sourceMappingURL=identical_conditions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_conditions.js?");
11767
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalConditions = exports.IdenticalConditionsConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nclass Conditions {\r\n constructor() {\r\n this.arr = [];\r\n this.arr = [];\r\n }\r\n push(e) {\r\n this.arr.push(e.concatTokens());\r\n }\r\n hasDuplicates() {\r\n return this.arr.some(x => this.arr.indexOf(x) !== this.arr.lastIndexOf(x));\r\n }\r\n}\r\nclass IdenticalConditionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalConditionsConf = IdenticalConditionsConf;\r\nclass IdenticalConditions extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IdenticalConditionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_conditions\",\r\n title: \"Identical conditions\",\r\n shortDescription: `Find identical conditions in IF + CASE + WHILE etc\r\n\r\nPrerequsites: code is pretty printed with identical cAsE`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n let issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const i of structure.findAllStructures(Structures.If)) {\r\n issues = issues.concat(this.analyzeIf(file, i));\r\n }\r\n for (const i of structure.findAllStructures(Structures.Case)) {\r\n issues = issues.concat(this.analyzeWhen(file, i));\r\n }\r\n for (const i of structure.findAllExpressions(Expressions.Cond)) {\r\n issues = issues.concat(this.analyzeCond(file, i));\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n analyzeCond(file, node) {\r\n const conditions = new Conditions();\r\n let operator = \"\";\r\n for (const c of node.getChildren()) {\r\n if (c instanceof nodes_1.ExpressionNode) {\r\n conditions.push(c);\r\n }\r\n else if (operator === \"\") {\r\n operator = c.get().getStr().toUpperCase();\r\n }\r\n else if (operator !== c.get().getStr().toUpperCase()) {\r\n return [];\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n analyzeIf(file, node) {\r\n var _a;\r\n const conditions = new Conditions();\r\n const i = node.findDirectStatement(Statements.If);\r\n if (i === undefined) {\r\n throw new Error(\"identical_conditions, no IF found\");\r\n }\r\n const c = i === null || i === void 0 ? void 0 : i.findDirectExpression(Expressions.Cond);\r\n if (c) {\r\n conditions.push(c);\r\n }\r\n for (const e of node.findDirectStructures(Structures.ElseIf)) {\r\n const c = (_a = e.findDirectStatement(Statements.ElseIf)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Cond);\r\n if (c) {\r\n conditions.push(c);\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n analyzeWhen(file, node) {\r\n const conditions = new Conditions();\r\n const i = node.findDirectStatement(Statements.Case);\r\n if (i === undefined) {\r\n throw new Error(\"identical_conditions, no CASE found\");\r\n }\r\n for (const e of node.findDirectStructures(Structures.When)) {\r\n const w = e.findDirectStatement(Statements.When);\r\n if (w === undefined) {\r\n continue;\r\n }\r\n for (const s of w.findAllExpressions(Expressions.Source)) {\r\n conditions.push(s);\r\n }\r\n }\r\n if (conditions.hasDuplicates()) {\r\n const message = \"Identical conditions\";\r\n const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.IdenticalConditions = IdenticalConditions;\r\n//# sourceMappingURL=identical_conditions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_conditions.js?");
11757
11768
 
11758
11769
  /***/ }),
11759
11770
 
@@ -11764,7 +11775,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11764
11775
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11765
11776
 
11766
11777
  "use strict";
11767
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalContents = exports.IdenticalContentsConf = void 0;\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nclass IdenticalContentsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalContentsConf = IdenticalContentsConf;\r\nclass IdenticalContents extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IdenticalContentsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_contents\",\r\n title: \"Identical contents\",\r\n shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.\n\nPrerequsites: code is pretty printed with identical cAsE\n\nChained statments are ignored`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `IF foo = bar.\n WRITE 'bar'.\n WRITE 'world'.\nELSE.\n WRITE 'foo'.\n WRITE 'world'.\nENDIF.`,\r\n goodExample: `IF foo = bar.\n WRITE 'bar'.\nELSE.\n WRITE 'foo'.\nENDIF.\nWRITE 'world'.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n let issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const i of structure.findAllStructuresRecursive(Structures.If)) {\r\n issues = issues.concat(this.analyzeIf(file, i));\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n analyzeIf(file, node) {\r\n var _a;\r\n if (node.getChildren().length !== 4) {\r\n return [];\r\n }\r\n const ifBody = node.findDirectStructure(Structures.Body);\r\n if (node.findDirectStructure(Structures.ElseIf)) {\r\n return [];\r\n }\r\n const elseBody = (_a = node.findDirectStructure(Structures.Else)) === null || _a === void 0 ? void 0 : _a.findDirectStructure(Structures.Body);\r\n if (elseBody === undefined || ifBody === undefined) {\r\n return [];\r\n }\r\n {\r\n const ifFirst = ifBody.getFirstChild();\r\n const elseFirst = elseBody.getFirstChild();\r\n if (ifFirst === undefined || elseFirst === undefined || this.isChained(ifFirst)) {\r\n return [];\r\n }\r\n else if (ifFirst.concatTokens() === elseFirst.concatTokens()) {\r\n const message = \"Identical contents\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n }\r\n {\r\n const ifLast = ifBody.getLastChild();\r\n const elseLast = elseBody.getLastChild();\r\n if (ifLast === undefined || elseLast === undefined || this.isChained(ifLast)) {\r\n return [];\r\n }\r\n else if (ifLast.concatTokens() === elseLast.concatTokens()) {\r\n const message = \"Identical contents\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n }\r\n return [];\r\n }\r\n isChained(node) {\r\n if (node === undefined) {\r\n return false;\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n return node.getColon() !== undefined;\r\n }\r\n else {\r\n return this.isChained(node.getFirstStatement());\r\n }\r\n }\r\n}\r\nexports.IdenticalContents = IdenticalContents;\r\n//# sourceMappingURL=identical_contents.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_contents.js?");
11778
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalContents = exports.IdenticalContentsConf = void 0;\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nclass IdenticalContentsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalContentsConf = IdenticalContentsConf;\r\nclass IdenticalContents extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IdenticalContentsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_contents\",\r\n title: \"Identical contents\",\r\n shortDescription: `Find identical contents in blocks inside IFs, both in the beginning and in the end.\r\n\r\nPrerequsites: code is pretty printed with identical cAsE\r\n\r\nChained statments are ignored`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `IF foo = bar.\r\n WRITE 'bar'.\r\n WRITE 'world'.\r\nELSE.\r\n WRITE 'foo'.\r\n WRITE 'world'.\r\nENDIF.`,\r\n goodExample: `IF foo = bar.\r\n WRITE 'bar'.\r\nELSE.\r\n WRITE 'foo'.\r\nENDIF.\r\nWRITE 'world'.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n let issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const i of structure.findAllStructuresRecursive(Structures.If)) {\r\n issues = issues.concat(this.analyzeIf(file, i));\r\n }\r\n return issues;\r\n }\r\n ////////////////\r\n analyzeIf(file, node) {\r\n var _a;\r\n if (node.getChildren().length !== 4) {\r\n return [];\r\n }\r\n const ifBody = node.findDirectStructure(Structures.Body);\r\n if (node.findDirectStructure(Structures.ElseIf)) {\r\n return [];\r\n }\r\n const elseBody = (_a = node.findDirectStructure(Structures.Else)) === null || _a === void 0 ? void 0 : _a.findDirectStructure(Structures.Body);\r\n if (elseBody === undefined || ifBody === undefined) {\r\n return [];\r\n }\r\n {\r\n const ifFirst = ifBody.getFirstChild();\r\n const elseFirst = elseBody.getFirstChild();\r\n if (ifFirst === undefined || elseFirst === undefined || this.isChained(ifFirst)) {\r\n return [];\r\n }\r\n else if (ifFirst.concatTokens() === elseFirst.concatTokens()) {\r\n const message = \"Identical contents\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n }\r\n {\r\n const ifLast = ifBody.getLastChild();\r\n const elseLast = elseBody.getLastChild();\r\n if (ifLast === undefined || elseLast === undefined || this.isChained(ifLast)) {\r\n return [];\r\n }\r\n else if (ifLast.concatTokens() === elseLast.concatTokens()) {\r\n const message = \"Identical contents\";\r\n const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n }\r\n return [];\r\n }\r\n isChained(node) {\r\n if (node === undefined) {\r\n return false;\r\n }\r\n else if (node instanceof nodes_1.StatementNode) {\r\n return node.getColon() !== undefined;\r\n }\r\n else {\r\n return this.isChained(node.getFirstStatement());\r\n }\r\n }\r\n}\r\nexports.IdenticalContents = IdenticalContents;\r\n//# sourceMappingURL=identical_contents.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_contents.js?");
11768
11779
 
11769
11780
  /***/ }),
11770
11781
 
@@ -11775,7 +11786,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11775
11786
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11776
11787
 
11777
11788
  "use strict";
11778
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalDescriptions = exports.IdenticalDescriptionsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nclass IdenticalDescriptionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalDescriptionsConf = IdenticalDescriptionsConf;\r\nclass IdenticalDescriptions {\r\n constructor() {\r\n this.conf = new IdenticalDescriptionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_descriptions\",\r\n title: \"Identical descriptions\",\r\n shortDescription: `Searches for objects with the same type and same description`,\r\n extendedInformation: `Case insensitive\n\nOnly checks the master language descriptions\n\nWorks for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,\r\n tags: [],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n var _a;\r\n this.descriptions = {};\r\n this.types = [\"INTF\", \"CLAS\", \"DOMA\", \"DTEL\"];\r\n for (const o of reg.getObjects()) {\r\n const type = o.getType();\r\n if (this.types.includes(type)) {\r\n const description = (_a = o.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (description === undefined || description === \"\") {\r\n continue;\r\n }\r\n if (this.descriptions[type] === undefined) {\r\n this.descriptions[type] = {};\r\n }\r\n if (this.descriptions[type][description] === undefined) {\r\n this.descriptions[type][description] = [];\r\n }\r\n this.descriptions[type][description].push(o.getName());\r\n }\r\n }\r\n return this;\r\n }\r\n run(o) {\r\n var _a;\r\n const issues = [];\r\n const type = o.getType();\r\n if (this.types.includes(type)) {\r\n const description = (_a = o.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (description === undefined || description === \"\") {\r\n return issues;\r\n }\r\n const found = this.descriptions[type][description].filter(a => a !== o.getName());\r\n if (found.length > 0) {\r\n const message = \"Identical description: \" + found[0];\r\n issues.push(issue_1.Issue.atRow(o.getXMLFile(), 1, message, this.getMetadata().key, this.getConfig().severity));\r\n }\r\n }\r\n if (o instanceof objects_1.FunctionGroup) {\r\n issues.push(...this.checkFunctionModules(o));\r\n }\r\n return issues;\r\n }\r\n checkFunctionModules(fugr) {\r\n var _a;\r\n const descriptions = {};\r\n for (const fm of fugr.getModules()) {\r\n const d = (_a = fm.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (d === undefined || d === \"\") {\r\n continue;\r\n }\r\n if (descriptions[d] !== undefined) {\r\n const message = \"FUGR \" + fugr.getName() + \" contains function modules with identical descriptions\";\r\n return [issue_1.Issue.atRow(fugr.getXMLFile(), 1, message, this.getMetadata().key, this.getConfig().severity)];\r\n }\r\n descriptions[d] = true;\r\n }\r\n return [];\r\n }\r\n}\r\nexports.IdenticalDescriptions = IdenticalDescriptions;\r\n//# sourceMappingURL=identical_descriptions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js?");
11789
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IdenticalDescriptions = exports.IdenticalDescriptionsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nclass IdenticalDescriptionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IdenticalDescriptionsConf = IdenticalDescriptionsConf;\r\nclass IdenticalDescriptions {\r\n constructor() {\r\n this.conf = new IdenticalDescriptionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"identical_descriptions\",\r\n title: \"Identical descriptions\",\r\n shortDescription: `Searches for objects with the same type and same description`,\r\n extendedInformation: `Case insensitive\r\n\r\nOnly checks the master language descriptions\r\n\r\nWorks for: INTF, CLAS, DOMA, DTEL, FUNC in same FUGR`,\r\n tags: [],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n var _a;\r\n this.descriptions = {};\r\n this.types = [\"INTF\", \"CLAS\", \"DOMA\", \"DTEL\"];\r\n for (const o of reg.getObjects()) {\r\n const type = o.getType();\r\n if (this.types.includes(type)) {\r\n const description = (_a = o.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (description === undefined || description === \"\") {\r\n continue;\r\n }\r\n if (this.descriptions[type] === undefined) {\r\n this.descriptions[type] = {};\r\n }\r\n if (this.descriptions[type][description] === undefined) {\r\n this.descriptions[type][description] = [];\r\n }\r\n this.descriptions[type][description].push(o.getName());\r\n }\r\n }\r\n return this;\r\n }\r\n run(o) {\r\n var _a;\r\n const issues = [];\r\n const type = o.getType();\r\n if (this.types.includes(type)) {\r\n const description = (_a = o.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (description === undefined || description === \"\") {\r\n return issues;\r\n }\r\n const found = this.descriptions[type][description].filter(a => a !== o.getName());\r\n if (found.length > 0) {\r\n const message = \"Identical description: \" + found[0];\r\n issues.push(issue_1.Issue.atRow(o.getXMLFile(), 1, message, this.getMetadata().key, this.getConfig().severity));\r\n }\r\n }\r\n if (o instanceof objects_1.FunctionGroup) {\r\n issues.push(...this.checkFunctionModules(o));\r\n }\r\n return issues;\r\n }\r\n checkFunctionModules(fugr) {\r\n var _a;\r\n const descriptions = {};\r\n for (const fm of fugr.getModules()) {\r\n const d = (_a = fm.getDescription()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\r\n if (d === undefined || d === \"\") {\r\n continue;\r\n }\r\n if (descriptions[d] !== undefined) {\r\n const message = \"FUGR \" + fugr.getName() + \" contains function modules with identical descriptions\";\r\n return [issue_1.Issue.atRow(fugr.getXMLFile(), 1, message, this.getMetadata().key, this.getConfig().severity)];\r\n }\r\n descriptions[d] = true;\r\n }\r\n return [];\r\n }\r\n}\r\nexports.IdenticalDescriptions = IdenticalDescriptions;\r\n//# sourceMappingURL=identical_descriptions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js?");
11779
11790
 
11780
11791
  /***/ }),
11781
11792
 
@@ -11797,7 +11808,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11797
11808
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11798
11809
 
11799
11810
  "use strict";
11800
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IfInIf = exports.IfInIfConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass IfInIfConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IfInIfConf = IfInIfConf;\r\nclass IfInIf extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IfInIfConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"if_in_if\",\r\n title: \"IF in IF\",\r\n shortDescription: `Detects nested ifs which can be refactored to a single condition using AND.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/01/\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,\r\n badExample: `IF condition1.\n IF condition2.\n ...\n ENDIF.\nENDIF.`,\r\n goodExample: `IF ( condition1 ) AND ( condition2 ).\n ...\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"IF in IF. Use IF cond1 AND cond2 instead\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n let possible = stru.findAllStructures(Structures.If);\r\n possible = possible.concat(stru.findAllStructures(Structures.Else));\r\n for (const i of possible) {\r\n if (i.findDirectStructures(Structures.ElseIf).length > 0\r\n || i.findDirectStructures(Structures.Else).length > 0) {\r\n continue;\r\n }\r\n const blist = i.findDirectStructures(Structures.Body);\r\n if (blist.length === 0) {\r\n continue;\r\n }\r\n const nlist = blist[0].findDirectStructures(Structures.Normal);\r\n if (nlist.length !== 1) {\r\n continue;\r\n }\r\n const niflist = nlist[0].findDirectStructures(Structures.If);\r\n if (niflist.length !== 1) {\r\n continue;\r\n }\r\n const nestedIf = niflist[0];\r\n if (i.get() instanceof Structures.If\r\n && (nestedIf.findDirectStructures(Structures.ElseIf).length > 0\r\n || nestedIf.findDirectStructures(Structures.Else).length > 0)) {\r\n continue;\r\n }\r\n const token = i.getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.IfInIf = IfInIf;\r\n//# sourceMappingURL=if_in_if.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
11811
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IfInIf = exports.IfInIfConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass IfInIfConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.IfInIfConf = IfInIfConf;\r\nclass IfInIf extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new IfInIfConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"if_in_if\",\r\n title: \"IF in IF\",\r\n shortDescription: `Detects nested ifs which can be refactored to a single condition using AND.`,\r\n extendedInformation: `https://docs.abapopenchecks.org/checks/01/\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low`,\r\n badExample: `IF condition1.\r\n IF condition2.\r\n ...\r\n ENDIF.\r\nENDIF.`,\r\n goodExample: `IF ( condition1 ) AND ( condition2 ).\r\n ...\r\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"IF in IF. Use IF cond1 AND cond2 instead\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n let possible = stru.findAllStructures(Structures.If);\r\n possible = possible.concat(stru.findAllStructures(Structures.Else));\r\n for (const i of possible) {\r\n if (i.findDirectStructures(Structures.ElseIf).length > 0\r\n || i.findDirectStructures(Structures.Else).length > 0) {\r\n continue;\r\n }\r\n const blist = i.findDirectStructures(Structures.Body);\r\n if (blist.length === 0) {\r\n continue;\r\n }\r\n const nlist = blist[0].findDirectStructures(Structures.Normal);\r\n if (nlist.length !== 1) {\r\n continue;\r\n }\r\n const niflist = nlist[0].findDirectStructures(Structures.If);\r\n if (niflist.length !== 1) {\r\n continue;\r\n }\r\n const nestedIf = niflist[0];\r\n if (i.get() instanceof Structures.If\r\n && (nestedIf.findDirectStructures(Structures.ElseIf).length > 0\r\n || nestedIf.findDirectStructures(Structures.Else).length > 0)) {\r\n continue;\r\n }\r\n const token = i.getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.IfInIf = IfInIf;\r\n//# sourceMappingURL=if_in_if.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/if_in_if.js?");
11801
11812
 
11802
11813
  /***/ }),
11803
11814
 
@@ -11808,7 +11819,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11808
11819
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11809
11820
 
11810
11821
  "use strict";
11811
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ImplementMethods = exports.ImplementMethodsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\n// todo: abstract methods from superclass parents(might be multiple), if class is not abstract\r\nclass ImplementMethodsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ImplementMethodsConf = ImplementMethodsConf;\r\nclass ImplementMethods extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ImplementMethodsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"implement_methods\",\r\n title: \"Implement methods\",\r\n shortDescription: `Checks for abstract methods and methods from interfaces which need implementing.`,\r\n extendedInformation: `INCLUDE programs are only checked in connection with their main programs.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n let ret = [];\r\n if (file.getStructure() === undefined) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Program && obj.isInclude() === true) {\r\n return [];\r\n }\r\n this.obj = obj;\r\n for (const classDefinition of file.getInfo().listClassDefinitions()) {\r\n const classImplementation = this.lookupImplementationInObject(classDefinition.name, obj);\r\n ret = ret.concat(this.checkClass(classDefinition, classImplementation));\r\n ret = ret.concat(this.checkInterfaces(classDefinition, classImplementation));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////////\r\n lookupImplementationInObject(name, obj) {\r\n for (const sub of obj.getABAPFiles()) {\r\n const impl = sub.getInfo().getClassImplementationByName(name);\r\n if (impl !== undefined) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n lookupDefinitionInObject(name) {\r\n for (const sub of this.obj.getABAPFiles()) {\r\n const def = sub.getInfo().getClassDefinitionByName(name);\r\n if (def !== undefined) {\r\n return def;\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkClass(def, impl) {\r\n const ret = [];\r\n for (const md of def.methods) {\r\n const found = impl === null || impl === void 0 ? void 0 : impl.methods.find(m => m.getName().toUpperCase() === md.name.toUpperCase());\r\n if (md.isAbstract === true) {\r\n if (found !== undefined) {\r\n const issue = issue_1.Issue.atIdentifier(found, \"Do not implement abstract method \\\"\" + md.name + \"\\\"\", this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n continue;\r\n }\r\n if (impl === undefined) {\r\n const message = \"Class implementation for \\\"\" + def.name + \"\\\" not found\";\r\n const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n else if (found === undefined) {\r\n const message = \"Implement method \\\"\" + md.name + \"\\\"\";\r\n const fix = this.buildFix(impl, md.name);\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, message, this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n }\r\n }\r\n return ret;\r\n }\r\n buildFix(impl, methodName) {\r\n var _a, _b;\r\n const file = this.obj.getABAPFileByName(impl.identifier.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {\r\n const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();\r\n if (name === impl.identifier.getName().toUpperCase()) {\r\n return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `\n METHOD ${methodName.toLowerCase()}.\n RETURN. \" todo, implement method\n ENDMETHOD.`);\r\n }\r\n }\r\n return undefined;\r\n }\r\n findInterface(identifier, name) {\r\n const idef = this.findInterfaceByName(name);\r\n if (idef === undefined) {\r\n const message = \"Implemented interface \\\"\" + name + \"\\\" not found\";\r\n const issue = issue_1.Issue.atIdentifier(identifier, message, this.getMetadata().key, this.conf.severity);\r\n return issue;\r\n }\r\n return idef;\r\n }\r\n findInterfaceByName(name) {\r\n var _a;\r\n let idef = undefined;\r\n const intf = this.reg.getObject(\"INTF\", name);\r\n if (intf === undefined) {\r\n // lookup in localfiles\r\n for (const file of this.obj.getABAPFiles()) {\r\n const found = file.getInfo().getInterfaceDefinitionByName(name);\r\n if (found) {\r\n idef = found;\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n idef = (_a = intf.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().listInterfaceDefinitions()[0];\r\n }\r\n return idef;\r\n }\r\n /** including implemented super interfaces */\r\n findInterfaceMethods(idef) {\r\n const methods = idef.methods.map((m) => {\r\n return { objectName: idef.name, method: m };\r\n });\r\n for (const i of idef.interfaces) {\r\n const sup = this.findInterface(idef.identifier, i.name);\r\n if (sup !== undefined && !(sup instanceof issue_1.Issue)) {\r\n sup.methods.forEach(m => {\r\n methods.push({ objectName: sup.name, method: m });\r\n });\r\n }\r\n }\r\n return methods;\r\n }\r\n findClass(name) {\r\n let def = this.lookupDefinitionInObject(name);\r\n let impl = this.lookupImplementationInObject(name, this.obj);\r\n if (def && impl) {\r\n return { def, impl };\r\n }\r\n const global = this.reg.getObject(\"CLAS\", name);\r\n if (global) {\r\n def = global.getClassDefinition();\r\n impl = this.lookupImplementationInObject(name, global);\r\n if (def && impl) {\r\n return { def, impl };\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkInterfaces(def, impl) {\r\n const ret = [];\r\n for (const interfaceInfo of def.interfaces) {\r\n const idef = this.findInterface(def.identifier, interfaceInfo.name);\r\n if (idef === undefined || interfaceInfo.partial === true || interfaceInfo.allAbstract === true) {\r\n continue; // ignore parser errors in interface\r\n }\r\n else if (idef instanceof issue_1.Issue) {\r\n return [idef];\r\n }\r\n for (const m of this.findInterfaceMethods(idef)) {\r\n if (interfaceInfo.abstractMethods.includes(m.method.name.toUpperCase())) {\r\n continue;\r\n }\r\n if (this.isImplemented(m, def, impl) === false) {\r\n const message = \"Implement method \\\"\" + m.method.name + \"\\\" from interface \\\"\" + m.objectName + \"\\\"\";\r\n if (impl) {\r\n const fix = this.buildFix(impl, m.objectName + \"~\" + m.method.name);\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, message, this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n }\r\n else {\r\n const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n isImplemented(m, def, impl) {\r\n if (impl === undefined) {\r\n return false;\r\n }\r\n const name = m.objectName + \"~\" + m.method.name;\r\n let found = impl.methods.find(m => m.getName().toUpperCase() === name.toUpperCase());\r\n if (found === undefined) {\r\n // try looking for ALIASes\r\n for (const alias of def.aliases) {\r\n if (alias.component.toUpperCase() === name.toUpperCase()) {\r\n found = impl.methods.find(m => m.getName().toUpperCase() === alias.name.toUpperCase());\r\n break;\r\n }\r\n }\r\n }\r\n if (found === undefined && def.superClassName !== undefined) {\r\n const clas = this.findClass(def.superClassName);\r\n if (clas) {\r\n return this.isImplemented(m, clas === null || clas === void 0 ? void 0 : clas.def, clas === null || clas === void 0 ? void 0 : clas.impl);\r\n }\r\n }\r\n if (found === undefined) {\r\n for (const i of def.interfaces) {\r\n const idef = this.findInterfaceByName(i.name);\r\n if (idef === undefined) {\r\n continue;\r\n }\r\n const ali = this.viaAliasInInterface(m, idef, impl);\r\n if (ali) {\r\n return ali;\r\n }\r\n }\r\n }\r\n return found !== undefined;\r\n }\r\n viaAliasInInterface(m, intf, impl) {\r\n for (const a of intf.aliases) {\r\n if (a.component.toUpperCase() === m.objectName.toUpperCase() + \"~\" + m.method.name.toUpperCase()) {\r\n const name = intf.name + \"~\" + a.name;\r\n const found = impl.methods.find(m => m.getName().toUpperCase() === name.toUpperCase());\r\n if (found) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.ImplementMethods = ImplementMethods;\r\n//# sourceMappingURL=implement_methods.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/implement_methods.js?");
11822
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ImplementMethods = exports.ImplementMethodsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\n// todo: abstract methods from superclass parents(might be multiple), if class is not abstract\r\nclass ImplementMethodsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ImplementMethodsConf = ImplementMethodsConf;\r\nclass ImplementMethods extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ImplementMethodsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"implement_methods\",\r\n title: \"Implement methods\",\r\n shortDescription: `Checks for abstract methods and methods from interfaces which need implementing.`,\r\n extendedInformation: `INCLUDE programs are only checked in connection with their main programs.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Quickfix],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n let ret = [];\r\n if (file.getStructure() === undefined) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Program && obj.isInclude() === true) {\r\n return [];\r\n }\r\n this.obj = obj;\r\n for (const classDefinition of file.getInfo().listClassDefinitions()) {\r\n const classImplementation = this.lookupImplementationInObject(classDefinition.name, obj);\r\n ret = ret.concat(this.checkClass(classDefinition, classImplementation));\r\n ret = ret.concat(this.checkInterfaces(classDefinition, classImplementation));\r\n }\r\n return ret;\r\n }\r\n /////////////////////////////////\r\n lookupImplementationInObject(name, obj) {\r\n for (const sub of obj.getABAPFiles()) {\r\n const impl = sub.getInfo().getClassImplementationByName(name);\r\n if (impl !== undefined) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n lookupDefinitionInObject(name) {\r\n for (const sub of this.obj.getABAPFiles()) {\r\n const def = sub.getInfo().getClassDefinitionByName(name);\r\n if (def !== undefined) {\r\n return def;\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkClass(def, impl) {\r\n const ret = [];\r\n for (const md of def.methods) {\r\n const found = impl === null || impl === void 0 ? void 0 : impl.methods.find(m => m.getName().toUpperCase() === md.name.toUpperCase());\r\n if (md.isAbstract === true) {\r\n if (found !== undefined) {\r\n const issue = issue_1.Issue.atIdentifier(found, \"Do not implement abstract method \\\"\" + md.name + \"\\\"\", this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n continue;\r\n }\r\n if (impl === undefined) {\r\n const message = \"Class implementation for \\\"\" + def.name + \"\\\" not found\";\r\n const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n else if (found === undefined) {\r\n const message = \"Implement method \\\"\" + md.name + \"\\\"\";\r\n const fix = this.buildFix(impl, md.name);\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, message, this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n }\r\n }\r\n return ret;\r\n }\r\n buildFix(impl, methodName) {\r\n var _a, _b;\r\n const file = this.obj.getABAPFileByName(impl.identifier.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.ClassImplementation)) || []) {\r\n const name = (_b = i.findFirstExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase();\r\n if (name === impl.identifier.getName().toUpperCase()) {\r\n return edit_helper_1.EditHelper.insertAt(file, i.getLastToken().getEnd(), `\r\n METHOD ${methodName.toLowerCase()}.\r\n RETURN. \" todo, implement method\r\n ENDMETHOD.`);\r\n }\r\n }\r\n return undefined;\r\n }\r\n findInterface(identifier, name) {\r\n const idef = this.findInterfaceByName(name);\r\n if (idef === undefined) {\r\n const message = \"Implemented interface \\\"\" + name + \"\\\" not found\";\r\n const issue = issue_1.Issue.atIdentifier(identifier, message, this.getMetadata().key, this.conf.severity);\r\n return issue;\r\n }\r\n return idef;\r\n }\r\n findInterfaceByName(name) {\r\n var _a;\r\n let idef = undefined;\r\n const intf = this.reg.getObject(\"INTF\", name);\r\n if (intf === undefined) {\r\n // lookup in localfiles\r\n for (const file of this.obj.getABAPFiles()) {\r\n const found = file.getInfo().getInterfaceDefinitionByName(name);\r\n if (found) {\r\n idef = found;\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n idef = (_a = intf.getMainABAPFile()) === null || _a === void 0 ? void 0 : _a.getInfo().listInterfaceDefinitions()[0];\r\n }\r\n return idef;\r\n }\r\n /** including implemented super interfaces */\r\n findInterfaceMethods(idef) {\r\n const methods = idef.methods.map((m) => {\r\n return { objectName: idef.name, method: m };\r\n });\r\n for (const i of idef.interfaces) {\r\n const sup = this.findInterface(idef.identifier, i.name);\r\n if (sup !== undefined && !(sup instanceof issue_1.Issue)) {\r\n sup.methods.forEach(m => {\r\n methods.push({ objectName: sup.name, method: m });\r\n });\r\n }\r\n }\r\n return methods;\r\n }\r\n findClass(name) {\r\n let def = this.lookupDefinitionInObject(name);\r\n let impl = this.lookupImplementationInObject(name, this.obj);\r\n if (def && impl) {\r\n return { def, impl };\r\n }\r\n const global = this.reg.getObject(\"CLAS\", name);\r\n if (global) {\r\n def = global.getClassDefinition();\r\n impl = this.lookupImplementationInObject(name, global);\r\n if (def && impl) {\r\n return { def, impl };\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkInterfaces(def, impl) {\r\n const ret = [];\r\n for (const interfaceInfo of def.interfaces) {\r\n const idef = this.findInterface(def.identifier, interfaceInfo.name);\r\n if (idef === undefined || interfaceInfo.partial === true || interfaceInfo.allAbstract === true) {\r\n continue; // ignore parser errors in interface\r\n }\r\n else if (idef instanceof issue_1.Issue) {\r\n return [idef];\r\n }\r\n for (const m of this.findInterfaceMethods(idef)) {\r\n if (interfaceInfo.abstractMethods.includes(m.method.name.toUpperCase())) {\r\n continue;\r\n }\r\n if (this.isImplemented(m, def, impl) === false) {\r\n const message = \"Implement method \\\"\" + m.method.name + \"\\\" from interface \\\"\" + m.objectName + \"\\\"\";\r\n if (impl) {\r\n const fix = this.buildFix(impl, m.objectName + \"~\" + m.method.name);\r\n const issue = issue_1.Issue.atIdentifier(impl.identifier, message, this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n }\r\n else {\r\n const issue = issue_1.Issue.atIdentifier(def.identifier, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n isImplemented(m, def, impl) {\r\n if (impl === undefined) {\r\n return false;\r\n }\r\n const name = m.objectName + \"~\" + m.method.name;\r\n let found = impl.methods.find(m => m.getName().toUpperCase() === name.toUpperCase());\r\n if (found === undefined) {\r\n // try looking for ALIASes\r\n for (const alias of def.aliases) {\r\n if (alias.component.toUpperCase() === name.toUpperCase()) {\r\n found = impl.methods.find(m => m.getName().toUpperCase() === alias.name.toUpperCase());\r\n break;\r\n }\r\n }\r\n }\r\n if (found === undefined && def.superClassName !== undefined) {\r\n const clas = this.findClass(def.superClassName);\r\n if (clas) {\r\n return this.isImplemented(m, clas === null || clas === void 0 ? void 0 : clas.def, clas === null || clas === void 0 ? void 0 : clas.impl);\r\n }\r\n }\r\n if (found === undefined) {\r\n for (const i of def.interfaces) {\r\n const idef = this.findInterfaceByName(i.name);\r\n if (idef === undefined) {\r\n continue;\r\n }\r\n const ali = this.viaAliasInInterface(m, idef, impl);\r\n if (ali) {\r\n return ali;\r\n }\r\n }\r\n }\r\n return found !== undefined;\r\n }\r\n viaAliasInInterface(m, intf, impl) {\r\n for (const a of intf.aliases) {\r\n if (a.component.toUpperCase() === m.objectName.toUpperCase() + \"~\" + m.method.name.toUpperCase()) {\r\n const name = intf.name + \"~\" + a.name;\r\n const found = impl.methods.find(m => m.getName().toUpperCase() === name.toUpperCase());\r\n if (found) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.ImplementMethods = ImplementMethods;\r\n//# sourceMappingURL=implement_methods.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/implement_methods.js?");
11812
11823
 
11813
11824
  /***/ }),
11814
11825
 
@@ -11819,7 +11830,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11819
11830
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11820
11831
 
11821
11832
  "use strict";
11822
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InStatementIndentation = exports.InStatementIndentationConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass InStatementIndentationConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Additional indent for first statement of blocks */\r\n this.blockStatements = 2;\r\n /** Ignore global exception classes */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.InStatementIndentationConf = InStatementIndentationConf;\r\nclass InStatementIndentation extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new InStatementIndentationConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"in_statement_indentation\",\r\n title: \"In-statement indentation\",\r\n shortDescription: \"Checks alignment within statements which span multiple lines.\",\r\n extendedInformation: `Lines following the first line should be indented once (2 spaces).\n \nFor block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)\nto distinguish them better from code within the block.`,\r\n badExample: `IF 1 = 1\n AND 2 = 2.\n WRITE 'hello' &&\n 'world'.\nENDIF.`,\r\n goodExample: `IF 1 = 1\n AND 2 = 2.\n WRITE 'hello' &&\n 'world'.\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Fix in-statement indentation\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const ret = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof objects_1.Class) {\r\n const definition = obj.getClassDefinition();\r\n if (definition === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n for (const s of file.getStatements()) {\r\n if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {\r\n continue;\r\n }\r\n const tokens = s.getTokens();\r\n if (tokens.length === 0) {\r\n continue;\r\n }\r\n const beginLine = tokens[0].getRow();\r\n let expected = tokens[0].getCol() + 2;\r\n const type = s.get();\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.FunctionModule\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.At\r\n || type instanceof Statements.Catch\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.When\r\n || type instanceof Statements.Cleanup\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.Form\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.MethodImplementation) {\r\n expected = expected + this.conf.blockStatements;\r\n }\r\n for (const t of tokens) {\r\n if (t.getRow() === beginLine) {\r\n continue;\r\n }\r\n if (t.getCol() < expected) {\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, new position_1.Position(t.getRow(), 1), t.getStart(), \" \".repeat(expected - 1));\r\n const issue = issue_1.Issue.atToken(file, t, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n break;\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.InStatementIndentation = InStatementIndentation;\r\n//# sourceMappingURL=in_statement_indentation.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js?");
11833
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.InStatementIndentation = exports.InStatementIndentationConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass InStatementIndentationConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Additional indent for first statement of blocks */\r\n this.blockStatements = 2;\r\n /** Ignore global exception classes */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.InStatementIndentationConf = InStatementIndentationConf;\r\nclass InStatementIndentation extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new InStatementIndentationConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"in_statement_indentation\",\r\n title: \"In-statement indentation\",\r\n shortDescription: \"Checks alignment within statements which span multiple lines.\",\r\n extendedInformation: `Lines following the first line should be indented once (2 spaces).\r\n \r\nFor block declaration statements, lines after the first should be indented an additional time (default: +2 spaces)\r\nto distinguish them better from code within the block.`,\r\n badExample: `IF 1 = 1\r\n AND 2 = 2.\r\n WRITE 'hello' &&\r\n 'world'.\r\nENDIF.`,\r\n goodExample: `IF 1 = 1\r\n AND 2 = 2.\r\n WRITE 'hello' &&\r\n 'world'.\r\nENDIF.`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Fix in-statement indentation\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const ret = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof objects_1.Class) {\r\n const definition = obj.getClassDefinition();\r\n if (definition === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n for (const s of file.getStatements()) {\r\n if (s.get() instanceof _statement_1.Comment || s.get() instanceof _statement_1.Unknown) {\r\n continue;\r\n }\r\n const tokens = s.getTokens();\r\n if (tokens.length === 0) {\r\n continue;\r\n }\r\n const beginLine = tokens[0].getRow();\r\n let expected = tokens[0].getCol() + 2;\r\n const type = s.get();\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Module\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.FunctionModule\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.At\r\n || type instanceof Statements.Catch\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.When\r\n || type instanceof Statements.Cleanup\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.Form\r\n || type instanceof Statements.Else\r\n || type instanceof Statements.ElseIf\r\n || type instanceof Statements.MethodImplementation) {\r\n expected = expected + this.conf.blockStatements;\r\n }\r\n for (const t of tokens) {\r\n if (t.getRow() === beginLine) {\r\n continue;\r\n }\r\n if (t.getCol() < expected) {\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, new position_1.Position(t.getRow(), 1), t.getStart(), \" \".repeat(expected - 1));\r\n const issue = issue_1.Issue.atToken(file, t, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n ret.push(issue);\r\n break;\r\n }\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.InStatementIndentation = InStatementIndentation;\r\n//# sourceMappingURL=in_statement_indentation.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js?");
11823
11834
 
11824
11835
  /***/ }),
11825
11836
 
@@ -11841,7 +11852,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11841
11852
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11842
11853
 
11843
11854
  "use strict";
11844
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_no_handler_pragma */ \"./node_modules/@abaplint/core/build/src/rules/check_no_handler_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_testclass_location */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_location.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pragma_placement */ \"./node_modules/@abaplint/core/build/src/rules/pragma_placement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
11855
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./7bit_ascii */ \"./node_modules/@abaplint/core/build/src/rules/7bit_ascii.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./abapdoc */ \"./node_modules/@abaplint/core/build/src/rules/abapdoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./align_parameters */ \"./node_modules/@abaplint/core/build/src/rules/align_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_naming */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./allowed_object_types */ \"./node_modules/@abaplint/core/build/src/rules/allowed_object_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./ambiguous_statement */ \"./node_modules/@abaplint/core/build/src/rules/ambiguous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./avoid_use */ \"./node_modules/@abaplint/core/build/src/rules/avoid_use.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_end_names */ \"./node_modules/@abaplint/core/build/src/rules/begin_end_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./begin_single_include */ \"./node_modules/@abaplint/core/build/src/rules/begin_single_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transaction_authority_check */ \"./node_modules/@abaplint/core/build/src/rules/call_transaction_authority_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cds_parser_error */ \"./node_modules/@abaplint/core/build/src/rules/cds_parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./chain_mainly_declarations */ \"./node_modules/@abaplint/core/build/src/rules/chain_mainly_declarations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_abstract */ \"./node_modules/@abaplint/core/build/src/rules/check_abstract.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_comments */ \"./node_modules/@abaplint/core/build/src/rules/check_comments.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_ddic */ \"./node_modules/@abaplint/core/build/src/rules/check_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_include */ \"./node_modules/@abaplint/core/build/src/rules/check_include.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_no_handler_pragma */ \"./node_modules/@abaplint/core/build/src/rules/check_no_handler_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_subrc */ \"./node_modules/@abaplint/core/build/src/rules/check_subrc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_syntax */ \"./node_modules/@abaplint/core/build/src/rules/check_syntax.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_text_elements */ \"./node_modules/@abaplint/core/build/src/rules/check_text_elements.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./check_transformation_exists */ \"./node_modules/@abaplint/core/build/src/rules/check_transformation_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./class_attribute_names */ \"./node_modules/@abaplint/core/build/src/rules/class_attribute_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cloud_types */ \"./node_modules/@abaplint/core/build/src/rules/cloud_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./colon_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/colon_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./commented_code */ \"./node_modules/@abaplint/core/build/src/rules/commented_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant_classes */ \"./node_modules/@abaplint/core/build/src/rules/constant_classes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constructor_visibility_public */ \"./node_modules/@abaplint/core/build/src/rules/constructor_visibility_public.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./contains_tab */ \"./node_modules/@abaplint/core/build/src/rules/contains_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclic_oo */ \"./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cyclomatic_complexity */ \"./node_modules/@abaplint/core/build/src/rules/cyclomatic_complexity.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./dangerous_statement */ \"./node_modules/@abaplint/core/build/src/rules/dangerous_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./db_operation_in_loop */ \"./node_modules/@abaplint/core/build/src/rules/db_operation_in_loop.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./definitions_top */ \"./node_modules/@abaplint/core/build/src/rules/definitions_top.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./description_empty */ \"./node_modules/@abaplint/core/build/src/rules/description_empty.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./double_space */ \"./node_modules/@abaplint/core/build/src/rules/double_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./downport */ \"./node_modules/@abaplint/core/build/src/rules/downport.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_statement */ \"./node_modules/@abaplint/core/build/src/rules/empty_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./empty_structure */ \"./node_modules/@abaplint/core/build/src/rules/empty_structure.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exit_or_check */ \"./node_modules/@abaplint/core/build/src/rules/exit_or_check.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./exporting */ \"./node_modules/@abaplint/core/build/src/rules/exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_identifier */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_identifier.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_pseudo_and_pragma */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_pseudo_and_pragma.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./forbidden_void_type */ \"./node_modules/@abaplint/core/build/src/rules/forbidden_void_type.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./form_tables_obsolete */ \"./node_modules/@abaplint/core/build/src/rules/form_tables_obsolete.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./fully_type_constants */ \"./node_modules/@abaplint/core/build/src/rules/fully_type_constants.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_module_recommendations */ \"./node_modules/@abaplint/core/build/src/rules/function_module_recommendations.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./functional_writing */ \"./node_modules/@abaplint/core/build/src/rules/functional_writing.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./global_class */ \"./node_modules/@abaplint/core/build/src/rules/global_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_conditions */ \"./node_modules/@abaplint/core/build/src/rules/identical_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_contents */ \"./node_modules/@abaplint/core/build/src/rules/identical_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/identical_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./identical_form_names */ \"./node_modules/@abaplint/core/build/src/rules/identical_form_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./if_in_if */ \"./node_modules/@abaplint/core/build/src/rules/if_in_if.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./implement_methods */ \"./node_modules/@abaplint/core/build/src/rules/implement_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./in_statement_indentation */ \"./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./indentation */ \"./node_modules/@abaplint/core/build/src/rules/indentation.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ \"./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ \"./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keep_single_parameter_on_one_line */ \"./node_modules/@abaplint/core/build/src/rules/keep_single_parameter_on_one_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./keyword_case */ \"./node_modules/@abaplint/core/build/src/rules/keyword_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_multiple_parameters */ \"./node_modules/@abaplint/core/build/src/rules/line_break_multiple_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_break_style */ \"./node_modules/@abaplint/core/build/src/rules/line_break_style.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_length */ \"./node_modules/@abaplint/core/build/src/rules/line_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./line_only_punc */ \"./node_modules/@abaplint/core/build/src/rules/line_only_punc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_class_naming */ \"./node_modules/@abaplint/core/build/src/rules/local_class_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_testclass_location */ \"./node_modules/@abaplint/core/build/src/rules/local_testclass_location.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./local_variable_names */ \"./node_modules/@abaplint/core/build/src/rules/local_variable_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./main_file_contents */ \"./node_modules/@abaplint/core/build/src/rules/main_file_contents.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./many_parentheses */ \"./node_modules/@abaplint/core/build/src/rules/many_parentheses.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_method_parameter_per_line */ \"./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./max_one_statement */ \"./node_modules/@abaplint/core/build/src/rules/max_one_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./message_exists */ \"./node_modules/@abaplint/core/build/src/rules/message_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_implemented_twice */ \"./node_modules/@abaplint/core/build/src/rules/method_implemented_twice.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_length */ \"./node_modules/@abaplint/core/build/src/rules/method_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_overwrites_builtin */ \"./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameter_names */ \"./node_modules/@abaplint/core/build/src/rules/method_parameter_names.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./mix_returning */ \"./node_modules/@abaplint/core/build/src/rules/mix_returning.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./modify_only_own_db_tables */ \"./node_modules/@abaplint/core/build/src/rules/modify_only_own_db_tables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./msag_consistency */ \"./node_modules/@abaplint/core/build/src/rules/msag_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./names_no_dash */ \"./node_modules/@abaplint/core/build/src/rules/names_no_dash.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./nesting */ \"./node_modules/@abaplint/core/build/src/rules/nesting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./newline_between_methods */ \"./node_modules/@abaplint/core/build/src/rules/newline_between_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_aliases */ \"./node_modules/@abaplint/core/build/src/rules/no_aliases.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_chained_assignment */ \"./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_public_attributes */ \"./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./no_yoda_conditions */ \"./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./object_naming */ \"./node_modules/@abaplint/core/build/src/rules/object_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./obsolete_statement */ \"./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_parameter_name */ \"./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_preceding_zeros */ \"./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./omit_receiving */ \"./node_modules/@abaplint/core/build/src/rules/omit_receiving.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_702_chaining */ \"./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_error */ \"./node_modules/@abaplint/core/build/src/rules/parser_error.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parser_missing_space */ \"./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./pragma_placement */ \"./node_modules/@abaplint/core/build/src/rules/pragma_placement.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_corresponding */ \"./node_modules/@abaplint/core/build/src/rules/prefer_corresponding.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_inline */ \"./node_modules/@abaplint/core/build/src/rules/prefer_inline.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_is_not */ \"./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_raise_exception_new */ \"./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_returning_to_exporting */ \"./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefer_xsdbool */ \"./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./preferred_compare_operator */ \"./node_modules/@abaplint/core/build/src/rules/preferred_compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./prefix_is_current_class */ \"./node_modules/@abaplint/core/build/src/rules/prefix_is_current_class.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./reduce_string_templates */ \"./node_modules/@abaplint/core/build/src/rules/reduce_string_templates.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./release_idoc */ \"./node_modules/@abaplint/core/build/src/rules/release_idoc.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./remove_descriptions */ \"./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./rfc_error_handling */ \"./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_add_order_by */ \"./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./select_performance */ \"./node_modules/@abaplint/core/build/src/rules/select_performance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./selection_screen_naming */ \"./node_modules/@abaplint/core/build/src/rules/selection_screen_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sequential_blank */ \"./node_modules/@abaplint/core/build/src/rules/sequential_blank.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./short_case */ \"./node_modules/@abaplint/core/build/src/rules/short_case.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sicf_consistency */ \"./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_colon */ \"./node_modules/@abaplint/core/build/src/rules/space_before_colon.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./space_before_dot */ \"./node_modules/@abaplint/core/build/src/rules/space_before_dot.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_escape_host_variables */ \"./node_modules/@abaplint/core/build/src/rules/sql_escape_host_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./start_at_tab */ \"./node_modules/@abaplint/core/build/src/rules/start_at_tab.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./static_call_via_instance */ \"./node_modules/@abaplint/core/build/src/rules/static_call_via_instance.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./superclass_final */ \"./node_modules/@abaplint/core/build/src/rules/superclass_final.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sy_modification */ \"./node_modules/@abaplint/core/build/src/rules/sy_modification.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./tabl_enhancement_category */ \"./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./try_without_catch */ \"./node_modules/@abaplint/core/build/src/rules/try_without_catch.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./type_form_parameters */ \"./node_modules/@abaplint/core/build/src/rules/type_form_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./types_naming */ \"./node_modules/@abaplint/core/build/src/rules/types_naming.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./uncaught_exception */ \"./node_modules/@abaplint/core/build/src/rules/uncaught_exception.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unknown_types */ \"./node_modules/@abaplint/core/build/src/rules/unknown_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unnecessary_chaining */ \"./node_modules/@abaplint/core/build/src/rules/unnecessary_chaining.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unreachable_code */ \"./node_modules/@abaplint/core/build/src/rules/unreachable_code.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unsecure_fae */ \"./node_modules/@abaplint/core/build/src/rules/unsecure_fae.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_ddic */ \"./node_modules/@abaplint/core/build/src/rules/unused_ddic.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_methods */ \"./node_modules/@abaplint/core/build/src/rules/unused_methods.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_types */ \"./node_modules/@abaplint/core/build/src/rules/unused_types.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./unused_variables */ \"./node_modules/@abaplint/core/build/src/rules/unused_variables.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_bool_expression */ \"./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_class_based_exceptions */ \"./node_modules/@abaplint/core/build/src/rules/use_class_based_exceptions.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_line_exists */ \"./node_modules/@abaplint/core/build/src/rules/use_line_exists.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./use_new */ \"./node_modules/@abaplint/core/build/src/rules/use_new.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./when_others_last */ \"./node_modules/@abaplint/core/build/src/rules/when_others_last.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./whitespace_end */ \"./node_modules/@abaplint/core/build/src/rules/whitespace_end.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./xml_consistency */ \"./node_modules/@abaplint/core/build/src/rules/xml_consistency.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/index.js?");
11845
11856
 
11846
11857
  /***/ }),
11847
11858
 
@@ -11863,7 +11874,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11863
11874
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11864
11875
 
11865
11876
  "use strict";
11866
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IntfReferencingClas = exports.IntfReferencingClasConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass IntfReferencingClasConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of classes allowed to be referenced, regex, case insensitive\r\n * @uniqueItems true\r\n */\r\n this.allow = [];\r\n }\r\n}\r\nexports.IntfReferencingClasConf = IntfReferencingClasConf;\r\nclass IntfReferencingClas {\r\n constructor() {\r\n this.conf = new IntfReferencingClasConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"intf_referencing_clas\",\r\n title: \"INTF referencing CLAS\",\r\n shortDescription: `Interface contains references to class`,\r\n extendedInformation: `Only global interfaces are checked.\n Only first level references are checked.\n Exception class references are ignored.\n Void references are ignored.`,\r\n };\r\n }\r\n getConfig() {\r\n if (this.conf.allow === undefined) {\r\n this.conf.allow = [];\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Interface)) {\r\n return [];\r\n }\r\n return this.traverse(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n ////////////////\r\n traverse(node) {\r\n var _a, _b;\r\n let ret = [];\r\n const message = \"Referencing CLAS: \";\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooType) === \"CLAS\"\r\n && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooName) !== undefined) {\r\n const found = this.reg.getObject(\"CLAS\", r.extra.ooName) || undefined;\r\n if (found && ddic.isException(found.getClassDefinition(), found)) {\r\n continue;\r\n }\r\n else if (this.getConfig().allow.some(reg => new RegExp(reg, \"i\").test(r.extra.ooName))) {\r\n continue;\r\n }\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + r.extra.ooName, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.traverse(c));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.IntfReferencingClas = IntfReferencingClas;\r\n//# sourceMappingURL=intf_referencing_clas.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js?");
11877
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.IntfReferencingClas = exports.IntfReferencingClasConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass IntfReferencingClasConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of classes allowed to be referenced, regex, case insensitive\r\n * @uniqueItems true\r\n */\r\n this.allow = [];\r\n }\r\n}\r\nexports.IntfReferencingClasConf = IntfReferencingClasConf;\r\nclass IntfReferencingClas {\r\n constructor() {\r\n this.conf = new IntfReferencingClasConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"intf_referencing_clas\",\r\n title: \"INTF referencing CLAS\",\r\n shortDescription: `Interface contains references to class`,\r\n extendedInformation: `Only global interfaces are checked.\r\n Only first level references are checked.\r\n Exception class references are ignored.\r\n Void references are ignored.`,\r\n };\r\n }\r\n getConfig() {\r\n if (this.conf.allow === undefined) {\r\n this.conf.allow = [];\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Interface)) {\r\n return [];\r\n }\r\n return this.traverse(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n ////////////////\r\n traverse(node) {\r\n var _a, _b;\r\n let ret = [];\r\n const message = \"Referencing CLAS: \";\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooType) === \"CLAS\"\r\n && ((_b = r.extra) === null || _b === void 0 ? void 0 : _b.ooName) !== undefined) {\r\n const found = this.reg.getObject(\"CLAS\", r.extra.ooName) || undefined;\r\n if (found && ddic.isException(found.getClassDefinition(), found)) {\r\n continue;\r\n }\r\n else if (this.getConfig().allow.some(reg => new RegExp(reg, \"i\").test(r.extra.ooName))) {\r\n continue;\r\n }\r\n ret.push(issue_1.Issue.atIdentifier(r.position, message + r.extra.ooName, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.traverse(c));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.IntfReferencingClas = IntfReferencingClas;\r\n//# sourceMappingURL=intf_referencing_clas.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js?");
11867
11878
 
11868
11879
  /***/ }),
11869
11880
 
@@ -11907,7 +11918,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11907
11918
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11908
11919
 
11909
11920
  "use strict";
11910
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineBreakStyle = exports.LineBreakStyleConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LineBreakStyleConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.LineBreakStyleConf = LineBreakStyleConf;\r\nclass LineBreakStyle {\r\n constructor() {\r\n this.conf = new LineBreakStyleConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_break_style\",\r\n title: \"Makes sure line breaks are consistent in the ABAP code\",\r\n shortDescription: `Enforces LF as newlines in ABAP files\n\nabapGit does not work with CRLF`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const output = [];\r\n for (const file of obj.getFiles()) {\r\n if (file.getFilename().endsWith(\".abap\")) {\r\n const rows = file.getRawRows();\r\n for (let i = 0; i < rows.length; i++) {\r\n if (rows[i].endsWith(\"\\r\") === true) {\r\n const message = \"Line contains carriage return\";\r\n const issue = issue_1.Issue.atRow(file, i + 1, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n break; // only one finding per file\r\n }\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.LineBreakStyle = LineBreakStyle;\r\n//# sourceMappingURL=line_break_style.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_break_style.js?");
11921
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineBreakStyle = exports.LineBreakStyleConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LineBreakStyleConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.LineBreakStyleConf = LineBreakStyleConf;\r\nclass LineBreakStyle {\r\n constructor() {\r\n this.conf = new LineBreakStyleConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_break_style\",\r\n title: \"Makes sure line breaks are consistent in the ABAP code\",\r\n shortDescription: `Enforces LF as newlines in ABAP files\r\n\r\nabapGit does not work with CRLF`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n const output = [];\r\n for (const file of obj.getFiles()) {\r\n if (file.getFilename().endsWith(\".abap\")) {\r\n const rows = file.getRawRows();\r\n for (let i = 0; i < rows.length; i++) {\r\n if (rows[i].endsWith(\"\\r\") === true) {\r\n const message = \"Line contains carriage return\";\r\n const issue = issue_1.Issue.atRow(file, i + 1, message, this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n break; // only one finding per file\r\n }\r\n }\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.LineBreakStyle = LineBreakStyle;\r\n//# sourceMappingURL=line_break_style.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_break_style.js?");
11911
11922
 
11912
11923
  /***/ }),
11913
11924
 
@@ -11918,7 +11929,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11918
11929
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11919
11930
 
11920
11931
  "use strict";
11921
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineLength = exports.LineLengthConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LineLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum line length in characters, trailing whitespace ignored */\r\n this.length = 120;\r\n }\r\n}\r\nexports.LineLengthConf = LineLengthConf;\r\nclass LineLength extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_length\",\r\n title: \"Line length\",\r\n shortDescription: `Detects lines exceeding the provided maximum length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length\nhttps://docs.abapopenchecks.org/checks/04/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n // maximum line length in abap files\r\n const maxLineLength = 255;\r\n file.getRawRows().forEach((row, rowIndex) => {\r\n row = row.replace(\"\\r\", \"\");\r\n let message = \"\";\r\n if (row.length > maxLineLength) {\r\n message = `Maximum allowed line length of ${maxLineLength} exceeded, currently ${row.length}`;\r\n }\r\n else if (row.length > this.conf.length) {\r\n message = `Reduce line length to max ${this.conf.length}, currently ${row.length}`;\r\n }\r\n else {\r\n return;\r\n }\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n });\r\n return issues;\r\n }\r\n}\r\nexports.LineLength = LineLength;\r\n//# sourceMappingURL=line_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_length.js?");
11932
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineLength = exports.LineLengthConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LineLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum line length in characters, trailing whitespace ignored */\r\n this.length = 120;\r\n }\r\n}\r\nexports.LineLengthConf = LineLengthConf;\r\nclass LineLength extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_length\",\r\n title: \"Line length\",\r\n shortDescription: `Detects lines exceeding the provided maximum length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#stick-to-a-reasonable-line-length\r\nhttps://docs.abapopenchecks.org/checks/04/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n // maximum line length in abap files\r\n const maxLineLength = 255;\r\n file.getRawRows().forEach((row, rowIndex) => {\r\n row = row.replace(\"\\r\", \"\");\r\n let message = \"\";\r\n if (row.length > maxLineLength) {\r\n message = `Maximum allowed line length of ${maxLineLength} exceeded, currently ${row.length}`;\r\n }\r\n else if (row.length > this.conf.length) {\r\n message = `Reduce line length to max ${this.conf.length}, currently ${row.length}`;\r\n }\r\n else {\r\n return;\r\n }\r\n issues.push(issue_1.Issue.atRow(file, rowIndex + 1, message, this.getMetadata().key, this.conf.severity));\r\n });\r\n return issues;\r\n }\r\n}\r\nexports.LineLength = LineLength;\r\n//# sourceMappingURL=line_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_length.js?");
11922
11933
 
11923
11934
  /***/ }),
11924
11935
 
@@ -11929,7 +11940,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11929
11940
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11930
11941
 
11931
11942
  "use strict";
11932
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineOnlyPunc = exports.LineOnlyPuncConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass LineOnlyPuncConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore lines with only puncutation in global exception classes */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.LineOnlyPuncConf = LineOnlyPuncConf;\r\nclass LineOnlyPunc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineOnlyPuncConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_only_punc\",\r\n title: \"Line containing only punctuation\",\r\n shortDescription: `Detects lines containing only punctuation.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end\nhttps://docs.abapopenchecks.org/checks/16/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: \"zcl_class=>method(\\n).\",\r\n goodExample: \"zcl_class=>method( ).\",\r\n };\r\n }\r\n getMessage() {\r\n return \"A line should not contain only \\\".\\\" or \\\").\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof objects_1.Class) {\r\n const definition = obj.getClassDefinition();\r\n if (definition === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n const rows = file.getRawRows();\r\n const reg = new RegExp(\"^\\\\)?\\\\. *(\\\\\\\".*)?$\");\r\n for (let i = 0; i < rows.length; i++) {\r\n if (reg.exec(rows[i].trim())) {\r\n const column = rows[i].indexOf(\")\") >= 0 ? rows[i].indexOf(\")\") + 1 : rows[i].indexOf(\".\") + 1;\r\n const position = new position_1.Position(i + 1, column);\r\n // merge punc into previous row\r\n let rowContent = rows[i].trim();\r\n // if reported row contains a paranthesis, prefix with space if needed\r\n if (rowContent.length > 1 && !rows[i - 1].endsWith(\" \") && !rows[i - 1].endsWith(\" \\r\")) {\r\n rowContent = \" \" + rowContent;\r\n }\r\n let offset = 0;\r\n if (rows[i - 1].endsWith(\"\\r\")) {\r\n offset = -1;\r\n }\r\n const startPos = new position_1.Position(i, rows[i - 1].length + 1 + offset);\r\n const endPos = new position_1.Position(i + 1, rows[i].length + 1);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, startPos, endPos, rowContent);\r\n const issue = issue_1.Issue.atPosition(file, position, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.LineOnlyPunc = LineOnlyPunc;\r\n//# sourceMappingURL=line_only_punc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_only_punc.js?");
11943
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LineOnlyPunc = exports.LineOnlyPuncConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass LineOnlyPuncConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore lines with only puncutation in global exception classes */\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.LineOnlyPuncConf = LineOnlyPuncConf;\r\nclass LineOnlyPunc extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LineOnlyPuncConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"line_only_punc\",\r\n title: \"Line containing only punctuation\",\r\n shortDescription: `Detects lines containing only punctuation.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#close-brackets-at-line-end\r\nhttps://docs.abapopenchecks.org/checks/16/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: \"zcl_class=>method(\\n).\",\r\n goodExample: \"zcl_class=>method( ).\",\r\n };\r\n }\r\n getMessage() {\r\n return \"A line should not contain only \\\".\\\" or \\\").\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof objects_1.Class) {\r\n const definition = obj.getClassDefinition();\r\n if (definition === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n const rows = file.getRawRows();\r\n const reg = new RegExp(\"^\\\\)?\\\\. *(\\\\\\\".*)?$\");\r\n for (let i = 0; i < rows.length; i++) {\r\n if (reg.exec(rows[i].trim())) {\r\n const column = rows[i].indexOf(\")\") >= 0 ? rows[i].indexOf(\")\") + 1 : rows[i].indexOf(\".\") + 1;\r\n const position = new position_1.Position(i + 1, column);\r\n // merge punc into previous row\r\n let rowContent = rows[i].trim();\r\n // if reported row contains a paranthesis, prefix with space if needed\r\n if (rowContent.length > 1 && !rows[i - 1].endsWith(\" \") && !rows[i - 1].endsWith(\" \\r\")) {\r\n rowContent = \" \" + rowContent;\r\n }\r\n let offset = 0;\r\n if (rows[i - 1].endsWith(\"\\r\")) {\r\n offset = -1;\r\n }\r\n const startPos = new position_1.Position(i, rows[i - 1].length + 1 + offset);\r\n const endPos = new position_1.Position(i + 1, rows[i].length + 1);\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, startPos, endPos, rowContent);\r\n const issue = issue_1.Issue.atPosition(file, position, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.LineOnlyPunc = LineOnlyPunc;\r\n//# sourceMappingURL=line_only_punc.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/line_only_punc.js?");
11933
11944
 
11934
11945
  /***/ }),
11935
11946
 
@@ -11962,7 +11973,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11962
11973
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11963
11974
 
11964
11975
  "use strict";
11965
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LocalVariableNames = exports.LocalVariableNamesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _naming_rule_config_1 = __webpack_require__(/*! ./_naming_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_naming_rule_config.js\");\r\nconst name_validator_1 = __webpack_require__(/*! ../utils/name_validator */ \"./node_modules/@abaplint/core/build/src/utils/name_validator.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LocalVariableNamesConf extends _naming_rule_config_1.NamingRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** The pattern for local variable names */\r\n this.expectedData = \"^L._.+$\";\r\n /** The pattern for local constant names */\r\n this.expectedConstant = \"^LC_.+$\";\r\n /** The pattern for field symbol names */\r\n this.expectedFS = \"^<L._.+>$\";\r\n }\r\n}\r\nexports.LocalVariableNamesConf = LocalVariableNamesConf;\r\nclass LocalVariableNames extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LocalVariableNamesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"local_variable_names\",\r\n title: \"Local variable naming conventions\",\r\n shortDescription: `\nAllows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.\nRegexes are case-insensitive.`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(expected, actual) {\r\n return this.conf.patternKind === \"required\" ?\r\n \"Local variable name does not match pattern \" + expected + \": \" + actual :\r\n \"Local variable name must not match pattern \" + expected + \": \" + actual;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const ret = [];\r\n if (this.conf.patternKind === undefined) {\r\n this.conf.patternKind = \"required\";\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n // inside METHOD, FORM, FUNCTION MODULE\r\n for (const node of stru.findAllStructures(Structures.Form)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n for (const node of stru.findAllStructures(Structures.Method)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n for (const node of stru.findAllStructures(Structures.FunctionModule)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n return ret;\r\n }\r\n checkLocals(structure, file) {\r\n let ret = [];\r\n // data, field symbols\r\n for (const dat of structure.findAllStatements(Statements.Data)) {\r\n const parent = structure.findParent(dat);\r\n if (parent && parent.get() instanceof Structures.Data) {\r\n continue; // inside DATA BEGIN OF\r\n }\r\n const found = dat.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n // inline data\r\n for (const dat of structure.findAllExpressions(Expressions.InlineData)) {\r\n const found = dat.findFirstExpression(Expressions.TargetField);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n // data structures, data begin of, first level\r\n const dataStructures = structure.findAllStructures(Structures.Data);\r\n for (const struc of dataStructures) {\r\n // ignore nested DATA BEGIN\r\n const stat = struc.findFirstStatement(Statements.DataBegin);\r\n const found = stat === null || stat === void 0 ? void 0 : stat.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n for (const fieldsymbol of structure.findAllStatements(Statements.FieldSymbol)) {\r\n const found = fieldsymbol.findFirstExpression(Expressions.FieldSymbol);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedFS));\r\n }\r\n }\r\n // inline field symbols\r\n for (const fieldsymbol of structure.findAllExpressions(Expressions.InlineFS)) {\r\n const found = fieldsymbol.findFirstExpression(Expressions.TargetFieldSymbol);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedFS));\r\n }\r\n }\r\n const constants = structure.findAllStatements(Statements.Constant);\r\n for (const constant of constants) {\r\n const parent = structure.findParent(constant);\r\n if (parent && parent.get() instanceof Structures.Constants) {\r\n continue; // inside DATA BEGIN OF\r\n }\r\n const found = constant.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedConstant));\r\n }\r\n }\r\n return ret;\r\n }\r\n checkName(token, file, expected) {\r\n const ret = [];\r\n const regex = new RegExp(expected, \"i\");\r\n const name = token.getStr();\r\n if (name_validator_1.NameValidator.violatesRule(name, regex, this.conf)) {\r\n const message = this.getDescription(expected, name);\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.LocalVariableNames = LocalVariableNames;\r\n//# sourceMappingURL=local_variable_names.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/local_variable_names.js?");
11976
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.LocalVariableNames = exports.LocalVariableNamesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _naming_rule_config_1 = __webpack_require__(/*! ./_naming_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_naming_rule_config.js\");\r\nconst name_validator_1 = __webpack_require__(/*! ../utils/name_validator */ \"./node_modules/@abaplint/core/build/src/utils/name_validator.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass LocalVariableNamesConf extends _naming_rule_config_1.NamingRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** The pattern for local variable names */\r\n this.expectedData = \"^L._.+$\";\r\n /** The pattern for local constant names */\r\n this.expectedConstant = \"^LC_.+$\";\r\n /** The pattern for field symbol names */\r\n this.expectedFS = \"^<L._.+>$\";\r\n }\r\n}\r\nexports.LocalVariableNamesConf = LocalVariableNamesConf;\r\nclass LocalVariableNames extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new LocalVariableNamesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"local_variable_names\",\r\n title: \"Local variable naming conventions\",\r\n shortDescription: `\r\nAllows you to enforce a pattern, such as a prefix, for local variables, constants and field symbols.\r\nRegexes are case-insensitive.`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(expected, actual) {\r\n return this.conf.patternKind === \"required\" ?\r\n \"Local variable name does not match pattern \" + expected + \": \" + actual :\r\n \"Local variable name must not match pattern \" + expected + \": \" + actual;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const ret = [];\r\n if (this.conf.patternKind === undefined) {\r\n this.conf.patternKind = \"required\";\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n // inside METHOD, FORM, FUNCTION MODULE\r\n for (const node of stru.findAllStructures(Structures.Form)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n for (const node of stru.findAllStructures(Structures.Method)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n for (const node of stru.findAllStructures(Structures.FunctionModule)) {\r\n ret.push(...this.checkLocals(node, file));\r\n }\r\n return ret;\r\n }\r\n checkLocals(structure, file) {\r\n let ret = [];\r\n // data, field symbols\r\n for (const dat of structure.findAllStatements(Statements.Data)) {\r\n const parent = structure.findParent(dat);\r\n if (parent && parent.get() instanceof Structures.Data) {\r\n continue; // inside DATA BEGIN OF\r\n }\r\n const found = dat.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n // inline data\r\n for (const dat of structure.findAllExpressions(Expressions.InlineData)) {\r\n const found = dat.findFirstExpression(Expressions.TargetField);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n // data structures, data begin of, first level\r\n const dataStructures = structure.findAllStructures(Structures.Data);\r\n for (const struc of dataStructures) {\r\n // ignore nested DATA BEGIN\r\n const stat = struc.findFirstStatement(Statements.DataBegin);\r\n const found = stat === null || stat === void 0 ? void 0 : stat.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedData));\r\n }\r\n }\r\n for (const fieldsymbol of structure.findAllStatements(Statements.FieldSymbol)) {\r\n const found = fieldsymbol.findFirstExpression(Expressions.FieldSymbol);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedFS));\r\n }\r\n }\r\n // inline field symbols\r\n for (const fieldsymbol of structure.findAllExpressions(Expressions.InlineFS)) {\r\n const found = fieldsymbol.findFirstExpression(Expressions.TargetFieldSymbol);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedFS));\r\n }\r\n }\r\n const constants = structure.findAllStatements(Statements.Constant);\r\n for (const constant of constants) {\r\n const parent = structure.findParent(constant);\r\n if (parent && parent.get() instanceof Structures.Constants) {\r\n continue; // inside DATA BEGIN OF\r\n }\r\n const found = constant.findFirstExpression(Expressions.DefinitionName);\r\n if (found) {\r\n const token = found.getFirstToken();\r\n ret = ret.concat(this.checkName(token, file, this.conf.expectedConstant));\r\n }\r\n }\r\n return ret;\r\n }\r\n checkName(token, file, expected) {\r\n const ret = [];\r\n const regex = new RegExp(expected, \"i\");\r\n const name = token.getStr();\r\n if (name_validator_1.NameValidator.violatesRule(name, regex, this.conf)) {\r\n const message = this.getDescription(expected, name);\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.LocalVariableNames = LocalVariableNames;\r\n//# sourceMappingURL=local_variable_names.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/local_variable_names.js?");
11966
11977
 
11967
11978
  /***/ }),
11968
11979
 
@@ -11984,7 +11995,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11984
11995
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11985
11996
 
11986
11997
  "use strict";
11987
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ManyParentheses = exports.ManyParenthesesConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ManyParenthesesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ManyParenthesesConf = ManyParenthesesConf;\r\nclass ManyParentheses extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ManyParenthesesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"many_parentheses\",\r\n title: \"Too many parentheses\",\r\n shortDescription: `Searches for expressions where extra parentheses can safely be removed`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `\nIF ( destination IS INITIAL ).\nENDIF.\nIF foo = boo AND ( bar = lar AND moo = loo ).\nENDIF.\n`,\r\n goodExample: `\nIF destination IS INITIAL.\nENDIF.\nIF foo = boo AND bar = lar AND moo = loo.\nENDIF.\n`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const cond of structure.findAllExpressions(Expressions.Cond)) {\r\n issues.push(...this.analyze(file, cond));\r\n }\r\n for (const sub of structure.findAllExpressions(Expressions.CondSub)) {\r\n const cond = sub.findDirectExpressions(Expressions.Cond);\r\n if (cond.length !== 1) {\r\n continue;\r\n }\r\n if (cond[0].getChildren().length === 1) {\r\n const message = \"Too many parentheses, simple\";\r\n const fixText = sub.getChildren()[1].concatTokens();\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, sub.getFirstToken().getStart(), sub.getLastToken().getEnd(), fixText);\r\n const issue = issue_1.Issue.atToken(file, sub.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n ////////////////////\r\n analyze(file, cond) {\r\n const issues = [];\r\n let comparator = \"\";\r\n for (const c of cond.getChildren()) {\r\n let current = \"\";\r\n if (c instanceof nodes_1.TokenNode) {\r\n current = c.get().getStr().toUpperCase();\r\n }\r\n else if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.CondSub) {\r\n if (c.getFirstToken().getStr().toUpperCase() === \"NOT\") {\r\n return [];\r\n }\r\n const i = c.findDirectExpression(Expressions.Cond);\r\n if (i === undefined) {\r\n return [];\r\n }\r\n current = this.findComparator(i);\r\n }\r\n if (comparator === \"\") {\r\n comparator = current;\r\n }\r\n else if (comparator !== current) {\r\n return [];\r\n }\r\n }\r\n if (comparator !== \"\" && comparator !== \"MIXED\") {\r\n const message = \"Too many parentheses, complex\";\r\n const issue = issue_1.Issue.atToken(file, cond.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n findComparator(cond) {\r\n let comparator = \"\";\r\n const children = cond.getChildren();\r\n for (const c of children) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n const current = c.get().getStr().toUpperCase();\r\n if (comparator === \"\") {\r\n comparator = current;\r\n }\r\n else if (current !== comparator) {\r\n return \"MIXED\";\r\n }\r\n }\r\n }\r\n return comparator;\r\n }\r\n}\r\nexports.ManyParentheses = ManyParentheses;\r\n//# sourceMappingURL=many_parentheses.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/many_parentheses.js?");
11998
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ManyParentheses = exports.ManyParenthesesConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass ManyParenthesesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ManyParenthesesConf = ManyParenthesesConf;\r\nclass ManyParentheses extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ManyParenthesesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"many_parentheses\",\r\n title: \"Too many parentheses\",\r\n shortDescription: `Searches for expressions where extra parentheses can safely be removed`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n badExample: `\r\nIF ( destination IS INITIAL ).\r\nENDIF.\r\nIF foo = boo AND ( bar = lar AND moo = loo ).\r\nENDIF.\r\n`,\r\n goodExample: `\r\nIF destination IS INITIAL.\r\nENDIF.\r\nIF foo = boo AND bar = lar AND moo = loo.\r\nENDIF.\r\n`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const structure = file.getStructure();\r\n if (structure === undefined) {\r\n return [];\r\n }\r\n for (const cond of structure.findAllExpressions(Expressions.Cond)) {\r\n issues.push(...this.analyze(file, cond));\r\n }\r\n for (const sub of structure.findAllExpressions(Expressions.CondSub)) {\r\n const cond = sub.findDirectExpressions(Expressions.Cond);\r\n if (cond.length !== 1) {\r\n continue;\r\n }\r\n if (cond[0].getChildren().length === 1) {\r\n const message = \"Too many parentheses, simple\";\r\n const fixText = sub.getChildren()[1].concatTokens();\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, sub.getFirstToken().getStart(), sub.getLastToken().getEnd(), fixText);\r\n const issue = issue_1.Issue.atToken(file, sub.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n ////////////////////\r\n analyze(file, cond) {\r\n const issues = [];\r\n let comparator = \"\";\r\n for (const c of cond.getChildren()) {\r\n let current = \"\";\r\n if (c instanceof nodes_1.TokenNode) {\r\n current = c.get().getStr().toUpperCase();\r\n }\r\n else if (c instanceof nodes_1.ExpressionNode && c.get() instanceof Expressions.CondSub) {\r\n if (c.getFirstToken().getStr().toUpperCase() === \"NOT\") {\r\n return [];\r\n }\r\n const i = c.findDirectExpression(Expressions.Cond);\r\n if (i === undefined) {\r\n return [];\r\n }\r\n current = this.findComparator(i);\r\n }\r\n if (comparator === \"\") {\r\n comparator = current;\r\n }\r\n else if (comparator !== current) {\r\n return [];\r\n }\r\n }\r\n if (comparator !== \"\" && comparator !== \"MIXED\") {\r\n const message = \"Too many parentheses, complex\";\r\n const issue = issue_1.Issue.atToken(file, cond.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n findComparator(cond) {\r\n let comparator = \"\";\r\n const children = cond.getChildren();\r\n for (const c of children) {\r\n if (c instanceof nodes_1.TokenNode) {\r\n const current = c.get().getStr().toUpperCase();\r\n if (comparator === \"\") {\r\n comparator = current;\r\n }\r\n else if (current !== comparator) {\r\n return \"MIXED\";\r\n }\r\n }\r\n }\r\n return comparator;\r\n }\r\n}\r\nexports.ManyParentheses = ManyParentheses;\r\n//# sourceMappingURL=many_parentheses.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/many_parentheses.js?");
11988
11999
 
11989
12000
  /***/ }),
11990
12001
 
@@ -11995,7 +12006,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11995
12006
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11996
12007
 
11997
12008
  "use strict";
11998
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MaxOneMethodParameterPerLine = exports.MaxOneMethodParameterPerLineConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass MaxOneMethodParameterPerLineConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MaxOneMethodParameterPerLineConf = MaxOneMethodParameterPerLineConf;\r\nclass MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MaxOneMethodParameterPerLineConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"max_one_method_parameter_per_line\",\r\n title: \"Max one method parameter definition per line\",\r\n shortDescription: `Keep max one method parameter description per line`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],\r\n badExample: `\nMETHODS apps_scope_token\n IMPORTING\n body TYPE bodyapps_scope_token client_id TYPE str.`,\r\n goodExample: `\nMETHODS apps_scope_token\n IMPORTING\n body TYPE bodyapps_scope_token\n client_id TYPE str.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n for (const statement of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.MethodDef)) || []) {\r\n let prev = undefined;\r\n for (const p of statement.findAllExpressions(Expressions.MethodParam)) {\r\n if (prev === undefined) {\r\n prev = p;\r\n continue;\r\n }\r\n if (prev.getFirstToken().getStart().getRow() === p.getFirstToken().getStart().getRow()) {\r\n const issue = issue_1.Issue.atToken(file, prev.getFirstToken(), this.getMetadata().title, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n prev = p;\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MaxOneMethodParameterPerLine = MaxOneMethodParameterPerLine;\r\n//# sourceMappingURL=max_one_method_parameter_per_line.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js?");
12009
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MaxOneMethodParameterPerLine = exports.MaxOneMethodParameterPerLineConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass MaxOneMethodParameterPerLineConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MaxOneMethodParameterPerLineConf = MaxOneMethodParameterPerLineConf;\r\nclass MaxOneMethodParameterPerLine extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MaxOneMethodParameterPerLineConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"max_one_method_parameter_per_line\",\r\n title: \"Max one method parameter definition per line\",\r\n shortDescription: `Keep max one method parameter description per line`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace],\r\n badExample: `\r\nMETHODS apps_scope_token\r\n IMPORTING\r\n body TYPE bodyapps_scope_token client_id TYPE str.`,\r\n goodExample: `\r\nMETHODS apps_scope_token\r\n IMPORTING\r\n body TYPE bodyapps_scope_token\r\n client_id TYPE str.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n for (const statement of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllStatements(Statements.MethodDef)) || []) {\r\n let prev = undefined;\r\n for (const p of statement.findAllExpressions(Expressions.MethodParam)) {\r\n if (prev === undefined) {\r\n prev = p;\r\n continue;\r\n }\r\n if (prev.getFirstToken().getStart().getRow() === p.getFirstToken().getStart().getRow()) {\r\n const issue = issue_1.Issue.atToken(file, prev.getFirstToken(), this.getMetadata().title, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n prev = p;\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MaxOneMethodParameterPerLine = MaxOneMethodParameterPerLine;\r\n//# sourceMappingURL=max_one_method_parameter_per_line.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/max_one_method_parameter_per_line.js?");
11999
12010
 
12000
12011
  /***/ }),
12001
12012
 
@@ -12006,7 +12017,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12006
12017
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12007
12018
 
12008
12019
  "use strict";
12009
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MaxOneStatement = exports.MaxOneStatementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass MaxOneStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MaxOneStatementConf = MaxOneStatementConf;\r\nclass MaxOneStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MaxOneStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"max_one_statement\",\r\n title: \"Max one statement per line\",\r\n shortDescription: `Checks that each line contains only a single statement.`,\r\n extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line\nhttps://docs.abapopenchecks.org/checks/11/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `WRITE foo. WRITE bar.`,\r\n goodExample: `WRITE foo.\\nWRITE bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Only one statement is allowed per line\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let prev = 0;\r\n let reported = 0;\r\n for (const statement of file.getStatements()) {\r\n const term = statement.getTerminator();\r\n if (statement.get() instanceof _statement_1.Comment\r\n || statement.get() instanceof _statement_1.NativeSQL\r\n || term === \",\") {\r\n continue;\r\n }\r\n const pos = statement.getStart();\r\n if (pos instanceof position_1.VirtualPosition) {\r\n continue;\r\n }\r\n const row = pos.getRow();\r\n if (prev === row && row !== reported && statement.getFirstToken().getStr() !== \".\") {\r\n const fix = edit_helper_1.EditHelper.insertAt(file, pos, \"\\n\");\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n reported = row;\r\n }\r\n prev = row;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MaxOneStatement = MaxOneStatement;\r\n//# sourceMappingURL=max_one_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/max_one_statement.js?");
12020
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MaxOneStatement = exports.MaxOneStatementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass MaxOneStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MaxOneStatementConf = MaxOneStatementConf;\r\nclass MaxOneStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MaxOneStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"max_one_statement\",\r\n title: \"Max one statement per line\",\r\n shortDescription: `Checks that each line contains only a single statement.`,\r\n extendedInformation: `Does not report empty statements, use rule empty_statement for detecting empty statements.\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#no-more-than-one-statement-per-line\r\nhttps://docs.abapopenchecks.org/checks/11/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `WRITE foo. WRITE bar.`,\r\n goodExample: `WRITE foo.\\nWRITE bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Only one statement is allowed per line\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let prev = 0;\r\n let reported = 0;\r\n for (const statement of file.getStatements()) {\r\n const term = statement.getTerminator();\r\n if (statement.get() instanceof _statement_1.Comment\r\n || statement.get() instanceof _statement_1.NativeSQL\r\n || term === \",\") {\r\n continue;\r\n }\r\n const pos = statement.getStart();\r\n if (pos instanceof position_1.VirtualPosition) {\r\n continue;\r\n }\r\n const row = pos.getRow();\r\n if (prev === row && row !== reported && statement.getFirstToken().getStr() !== \".\") {\r\n const fix = edit_helper_1.EditHelper.insertAt(file, pos, \"\\n\");\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n reported = row;\r\n }\r\n prev = row;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MaxOneStatement = MaxOneStatement;\r\n//# sourceMappingURL=max_one_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/max_one_statement.js?");
12010
12021
 
12011
12022
  /***/ }),
12012
12023
 
@@ -12039,7 +12050,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12039
12050
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12040
12051
 
12041
12052
  "use strict";
12042
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodLength = exports.MethodLengthConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst method_length_stats_1 = __webpack_require__(/*! ../utils/method_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/method_length_stats.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst form_length_stats_1 = __webpack_require__(/*! ../utils/form_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/form_length_stats.js\");\r\nclass MethodLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum method/form length in statements. */\r\n this.statements = 100;\r\n /** Checks for empty methods/forms. */\r\n this.errorWhenEmpty = true;\r\n /** Option to ignore test classes for this check. */\r\n this.ignoreTestClasses = false;\r\n /** Option to check forms. */\r\n this.checkForms = true;\r\n }\r\n}\r\nexports.MethodLengthConf = MethodLengthConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n IssueType[IssueType[\"EmptyMethod\"] = 0] = \"EmptyMethod\";\r\n IssueType[IssueType[\"MaxStatements\"] = 1] = \"MaxStatements\";\r\n})(IssueType || (IssueType = {}));\r\nclass MethodLength {\r\n constructor() {\r\n this.conf = new MethodLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"method_length\",\r\n title: \"Method/Form Length\",\r\n shortDescription: `Checks relating to method/form length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType, actual) {\r\n switch (issueType) {\r\n case IssueType.EmptyMethod: {\r\n return \"Empty method/form\";\r\n }\r\n case IssueType.MaxStatements: {\r\n return \"Reduce method/form length to max \" + this.conf.statements + \" statements, currently \" + actual;\r\n }\r\n default: {\r\n return \"\";\r\n }\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n run(obj) {\r\n const methodStats = method_length_stats_1.MethodLengthStats.run(obj);\r\n const methodIssues = this.check(methodStats);\r\n let formIssues = [];\r\n if (this.conf.checkForms) {\r\n const formStats = form_length_stats_1.FormLengthStats.run(obj);\r\n formIssues = this.check(formStats);\r\n }\r\n return methodIssues.concat(formIssues);\r\n }\r\n check(stats) {\r\n const issues = [];\r\n for (const s of stats) {\r\n if ((this.conf.ignoreTestClasses === true)\r\n && s.file.getFilename().includes(\".testclasses.\")) {\r\n continue;\r\n }\r\n if (s.count === 0 && this.conf.errorWhenEmpty === true) {\r\n const issue = issue_1.Issue.atPosition(s.file, s.pos, this.getDescription(IssueType.EmptyMethod, \"0\"), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n if (s.count > this.conf.statements) {\r\n const message = this.getDescription(IssueType.MaxStatements, s.count.toString());\r\n const issue = issue_1.Issue.atPosition(s.file, s.pos, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MethodLength = MethodLength;\r\n//# sourceMappingURL=method_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/method_length.js?");
12053
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodLength = exports.MethodLengthConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst method_length_stats_1 = __webpack_require__(/*! ../utils/method_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/method_length_stats.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst form_length_stats_1 = __webpack_require__(/*! ../utils/form_length_stats */ \"./node_modules/@abaplint/core/build/src/utils/form_length_stats.js\");\r\nclass MethodLengthConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum method/form length in statements. */\r\n this.statements = 100;\r\n /** Checks for empty methods/forms. */\r\n this.errorWhenEmpty = true;\r\n /** Option to ignore test classes for this check. */\r\n this.ignoreTestClasses = false;\r\n /** Option to check forms. */\r\n this.checkForms = true;\r\n }\r\n}\r\nexports.MethodLengthConf = MethodLengthConf;\r\nvar IssueType;\r\n(function (IssueType) {\r\n IssueType[IssueType[\"EmptyMethod\"] = 0] = \"EmptyMethod\";\r\n IssueType[IssueType[\"MaxStatements\"] = 1] = \"MaxStatements\";\r\n})(IssueType || (IssueType = {}));\r\nclass MethodLength {\r\n constructor() {\r\n this.conf = new MethodLengthConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"method_length\",\r\n title: \"Method/Form Length\",\r\n shortDescription: `Checks relating to method/form length.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-methods-small`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(issueType, actual, type) {\r\n switch (issueType) {\r\n case IssueType.EmptyMethod: {\r\n return \"Empty \" + type;\r\n }\r\n case IssueType.MaxStatements: {\r\n return \"Reduce \" + type + \" length to max \" + this.conf.statements + \" statements, currently \" + actual;\r\n }\r\n default: {\r\n return \"\";\r\n }\r\n }\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n run(obj) {\r\n const methodStats = method_length_stats_1.MethodLengthStats.run(obj);\r\n const methodIssues = this.check(methodStats, \"METHOD\");\r\n let formIssues = [];\r\n if (this.conf.checkForms) {\r\n const formStats = form_length_stats_1.FormLengthStats.run(obj);\r\n formIssues = this.check(formStats, \"FORM\");\r\n }\r\n return methodIssues.concat(formIssues);\r\n }\r\n // ***********************\r\n check(stats, type) {\r\n const issues = [];\r\n for (const s of stats) {\r\n if ((this.conf.ignoreTestClasses === true)\r\n && s.file.getFilename().includes(\".testclasses.\")) {\r\n continue;\r\n }\r\n if (s.count === 0 && this.conf.errorWhenEmpty === true) {\r\n const issue = issue_1.Issue.atPosition(s.file, s.pos, this.getDescription(IssueType.EmptyMethod, \"0\", type), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n if (s.count > this.conf.statements) {\r\n const message = this.getDescription(IssueType.MaxStatements, s.count.toString(), type);\r\n const issue = issue_1.Issue.atPosition(s.file, s.pos, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MethodLength = MethodLength;\r\n//# sourceMappingURL=method_length.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/method_length.js?");
12043
12054
 
12044
12055
  /***/ }),
12045
12056
 
@@ -12116,7 +12127,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12116
12127
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12117
12128
 
12118
12129
  "use strict";
12119
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Nesting = exports.NestingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NestingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum allowed nesting depth */\r\n this.depth = 5;\r\n }\r\n}\r\nexports.NestingConf = NestingConf;\r\nclass Nesting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NestingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"nesting\",\r\n title: \"Check nesting depth\",\r\n shortDescription: `Checks for methods exceeding a maximum nesting depth`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low\nhttps://docs.abapopenchecks.org/checks/74/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(max) {\r\n return \"Reduce nesting depth to max \" + max;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let depth = 0;\r\n for (const statement of file.getStatements()) {\r\n const type = statement.get();\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.Try) {\r\n depth = depth + 1;\r\n }\r\n else if (type instanceof Statements.EndIf\r\n || type instanceof Statements.EndCase\r\n || type instanceof Statements.EndWhile\r\n || type instanceof Statements.EndLoop\r\n || type instanceof Statements.EndSelect\r\n || type instanceof Statements.EndDo\r\n || type instanceof Statements.EndTry) {\r\n depth = depth - 1;\r\n }\r\n if (depth > this.conf.depth) {\r\n const pos = statement.getFirstToken().getStart();\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getDescription(this.conf.depth.toString()), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n break; // only one finding per file\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Nesting = Nesting;\r\n//# sourceMappingURL=nesting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/nesting.js?");
12130
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Nesting = exports.NestingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NestingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Maximum allowed nesting depth */\r\n this.depth = 5;\r\n }\r\n}\r\nexports.NestingConf = NestingConf;\r\nclass Nesting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NestingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"nesting\",\r\n title: \"Check nesting depth\",\r\n shortDescription: `Checks for methods exceeding a maximum nesting depth`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#keep-the-nesting-depth-low\r\nhttps://docs.abapopenchecks.org/checks/74/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(max) {\r\n return \"Reduce nesting depth to max \" + max;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let depth = 0;\r\n for (const statement of file.getStatements()) {\r\n const type = statement.get();\r\n if (type instanceof Statements.If\r\n || type instanceof Statements.Case\r\n || type instanceof Statements.While\r\n || type instanceof Statements.Loop\r\n || type instanceof Statements.SelectLoop\r\n || type instanceof Statements.Do\r\n || type instanceof Statements.Try) {\r\n depth = depth + 1;\r\n }\r\n else if (type instanceof Statements.EndIf\r\n || type instanceof Statements.EndCase\r\n || type instanceof Statements.EndWhile\r\n || type instanceof Statements.EndLoop\r\n || type instanceof Statements.EndSelect\r\n || type instanceof Statements.EndDo\r\n || type instanceof Statements.EndTry) {\r\n depth = depth - 1;\r\n }\r\n if (depth > this.conf.depth) {\r\n const pos = statement.getFirstToken().getStart();\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getDescription(this.conf.depth.toString()), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n break; // only one finding per file\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Nesting = Nesting;\r\n//# sourceMappingURL=nesting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/nesting.js?");
12120
12131
 
12121
12132
  /***/ }),
12122
12133
 
@@ -12149,7 +12160,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12149
12160
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12150
12161
 
12151
12162
  "use strict";
12152
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoChainedAssignment = exports.NoChainedAssignmentConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoChainedAssignmentConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.NoChainedAssignmentConf = NoChainedAssignmentConf;\r\nclass NoChainedAssignment extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoChainedAssignmentConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_chained_assignment\",\r\n title: \"No chained assignment\",\r\n shortDescription: `Find chained assingments and reports issues`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],\r\n badExample: `var1 = var2 = var3.`,\r\n goodExample: `var2 = var3.\nvar1 = var2.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n if (!(s.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n if (s.findDirectExpressions(Expressions.Target).length >= 2) {\r\n const message = \"No chained assignment\";\r\n const issue = issue_1.Issue.atStatement(file, s, message, this.getMetadata().key);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoChainedAssignment = NoChainedAssignment;\r\n//# sourceMappingURL=no_chained_assignment.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js?");
12163
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoChainedAssignment = exports.NoChainedAssignmentConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoChainedAssignmentConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.NoChainedAssignmentConf = NoChainedAssignmentConf;\r\nclass NoChainedAssignment extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoChainedAssignmentConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_chained_assignment\",\r\n title: \"No chained assignment\",\r\n shortDescription: `Find chained assingments and reports issues`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#dont-chain-assignments`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],\r\n badExample: `var1 = var2 = var3.`,\r\n goodExample: `var2 = var3.\r\nvar1 = var2.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n if (!(s.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n if (s.findDirectExpressions(Expressions.Target).length >= 2) {\r\n const message = \"No chained assignment\";\r\n const issue = issue_1.Issue.atStatement(file, s, message, this.getMetadata().key);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoChainedAssignment = NoChainedAssignment;\r\n//# sourceMappingURL=no_chained_assignment.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_chained_assignment.js?");
12153
12164
 
12154
12165
  /***/ }),
12155
12166
 
@@ -12160,7 +12171,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12160
12171
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12161
12172
 
12162
12173
  "use strict";
12163
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoPublicAttributes = exports.NoPublicAttributesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ../abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoPublicAttributesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows public attributes, if they are declared as READ-ONLY. */\r\n this.allowReadOnly = false;\r\n }\r\n}\r\nexports.NoPublicAttributesConf = NoPublicAttributesConf;\r\nclass NoPublicAttributes extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoPublicAttributesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_public_attributes\",\r\n title: \"No public attributes\",\r\n shortDescription: `Checks that classes and interfaces don't contain any public attributes.\nExceptions are excluded from this rule.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"Public attributes are not allowed, attribute \\\"\" + name + \"\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n this.file = file;\r\n const attributes = this.getAllPublicAttributes(obj);\r\n return this.findAllIssues(attributes);\r\n }\r\n getAllPublicAttributes(obj) {\r\n let attributes = [];\r\n attributes = attributes.concat(this.getAllPublicClassAttributes(obj));\r\n attributes = attributes.concat(this.getAllPublicInterfaceAttributes());\r\n return attributes;\r\n }\r\n getAllPublicClassAttributes(obj) {\r\n let attributes = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const classDef of this.file.getInfo().listClassDefinitions()) {\r\n if (ddic.isException(classDef, obj)) {\r\n continue;\r\n }\r\n attributes = attributes.concat(classDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n getAllPublicInterfaceAttributes() {\r\n let attributes = [];\r\n for (const interfaceDef of this.file.getInfo().listInterfaceDefinitions()) {\r\n attributes = attributes.concat(interfaceDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n findAllIssues(attributes) {\r\n const issues = [];\r\n for (const attr of attributes) {\r\n if (this.conf.allowReadOnly === true && attr.readOnly) {\r\n continue;\r\n }\r\n else if (attr.level === _abap_file_information_1.AttributeLevel.Constant) {\r\n continue;\r\n }\r\n const issue = issue_1.Issue.atIdentifier(attr.identifier, this.getDescription(attr.name), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoPublicAttributes = NoPublicAttributes;\r\n//# sourceMappingURL=no_public_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js?");
12174
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoPublicAttributes = exports.NoPublicAttributesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ../abap/4_file_information/_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoPublicAttributesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Allows public attributes, if they are declared as READ-ONLY. */\r\n this.allowReadOnly = false;\r\n }\r\n}\r\nexports.NoPublicAttributesConf = NoPublicAttributesConf;\r\nclass NoPublicAttributes extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoPublicAttributesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_public_attributes\",\r\n title: \"No public attributes\",\r\n shortDescription: `Checks that classes and interfaces don't contain any public attributes.\r\nExceptions are excluded from this rule.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#members-private-by-default-protected-only-if-needed`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"Public attributes are not allowed, attribute \\\"\" + name + \"\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n this.file = file;\r\n const attributes = this.getAllPublicAttributes(obj);\r\n return this.findAllIssues(attributes);\r\n }\r\n getAllPublicAttributes(obj) {\r\n let attributes = [];\r\n attributes = attributes.concat(this.getAllPublicClassAttributes(obj));\r\n attributes = attributes.concat(this.getAllPublicInterfaceAttributes());\r\n return attributes;\r\n }\r\n getAllPublicClassAttributes(obj) {\r\n let attributes = [];\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n for (const classDef of this.file.getInfo().listClassDefinitions()) {\r\n if (ddic.isException(classDef, obj)) {\r\n continue;\r\n }\r\n attributes = attributes.concat(classDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n getAllPublicInterfaceAttributes() {\r\n let attributes = [];\r\n for (const interfaceDef of this.file.getInfo().listInterfaceDefinitions()) {\r\n attributes = attributes.concat(interfaceDef.attributes.filter(a => a.visibility === visibility_1.Visibility.Public));\r\n }\r\n return attributes;\r\n }\r\n findAllIssues(attributes) {\r\n const issues = [];\r\n for (const attr of attributes) {\r\n if (this.conf.allowReadOnly === true && attr.readOnly) {\r\n continue;\r\n }\r\n else if (attr.level === _abap_file_information_1.AttributeLevel.Constant) {\r\n continue;\r\n }\r\n const issue = issue_1.Issue.atIdentifier(attr.identifier, this.getDescription(attr.name), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.NoPublicAttributes = NoPublicAttributes;\r\n//# sourceMappingURL=no_public_attributes.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_public_attributes.js?");
12164
12175
 
12165
12176
  /***/ }),
12166
12177
 
@@ -12171,7 +12182,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12171
12182
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12172
12183
 
12173
12184
  "use strict";
12174
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoYodaConditions = exports.NoYodaConditionsConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoYodaConditionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Only report issues where the left side is a constant */\r\n this.onlyConstants = false;\r\n }\r\n}\r\nexports.NoYodaConditionsConf = NoYodaConditionsConf;\r\nclass NoYodaConditions extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoYodaConditionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_yoda_conditions\",\r\n title: \"No Yoda conditions\",\r\n shortDescription: `Finds Yoda conditions and reports issues`,\r\n extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions\n\nConditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `IF 0 <> sy-subrc.\nENDIF.`,\r\n goodExample: `IF sy-subrc <> 0.\nENDIF.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b;\r\n const issues = [];\r\n for (const c of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Compare)) || []) {\r\n const operator = (_b = c.findDirectExpression(Expressions.CompareOperator)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n if (operator === undefined\r\n || operator === \"CP\"\r\n || operator === \"NP\"\r\n || operator === \"CS\"\r\n || operator === \"NS\"\r\n || operator === \"CA\"\r\n || operator === \"NA\"\r\n || operator === \"CO\"\r\n || operator === \"CN\") {\r\n continue;\r\n }\r\n const sources = c.findDirectExpressions(Expressions.Source);\r\n if (sources.length !== 2) {\r\n continue;\r\n }\r\n if (this.conf.onlyConstants === true) {\r\n if (this.isConstant(sources[0]) === true && this.isConstant(sources[1]) === false) {\r\n const start = sources[0].getFirstToken().getStart();\r\n const end = sources[1].getLastToken().getEnd();\r\n const issue = issue_1.Issue.atRange(file, start, end, \"No Yoda conditions\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n continue;\r\n }\r\n // Scenarios:\r\n // constant COMPARE chain\r\n // constant COMPARE multiple tokens with spaces\r\n // fieldChain COMPARE multiple tokens with spaces\r\n if ((this.withoutSpaces(sources[0]) === false && this.withoutSpaces(sources[1]) === true) || ((this.isConstant(sources[0]) === true && this.isFieldChain(sources[1]) === true))) {\r\n const start = sources[0].getFirstToken().getStart();\r\n const end = sources[1].getLastToken().getEnd();\r\n const issue = issue_1.Issue.atRange(file, start, end, \"No Yoda conditions\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n isConstant(node) {\r\n var _a;\r\n if (node.getChildren().length > 1) {\r\n return false;\r\n }\r\n return ((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Constant;\r\n }\r\n isFieldChain(node) {\r\n var _a;\r\n if (node.getChildren().length > 1) {\r\n return false;\r\n }\r\n return ((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.FieldChain;\r\n }\r\n withoutSpaces(node) {\r\n return node.concatTokensWithoutStringsAndComments().includes(\" \");\r\n }\r\n}\r\nexports.NoYodaConditions = NoYodaConditions;\r\n//# sourceMappingURL=no_yoda_conditions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js?");
12185
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.NoYodaConditions = exports.NoYodaConditionsConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass NoYodaConditionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Only report issues where the left side is a constant */\r\n this.onlyConstants = false;\r\n }\r\n}\r\nexports.NoYodaConditionsConf = NoYodaConditionsConf;\r\nclass NoYodaConditions extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new NoYodaConditionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"no_yoda_conditions\",\r\n title: \"No Yoda conditions\",\r\n shortDescription: `Finds Yoda conditions and reports issues`,\r\n extendedInformation: `https://en.wikipedia.org/wiki/Yoda_conditions\r\n\r\nConditions with operators CP, NP, CS, NS, CA, NA, CO, CN are ignored`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `IF 0 <> sy-subrc.\r\nENDIF.`,\r\n goodExample: `IF sy-subrc <> 0.\r\nENDIF.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b;\r\n const issues = [];\r\n for (const c of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Compare)) || []) {\r\n const operator = (_b = c.findDirectExpression(Expressions.CompareOperator)) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase();\r\n if (operator === undefined\r\n || operator === \"CP\"\r\n || operator === \"NP\"\r\n || operator === \"CS\"\r\n || operator === \"NS\"\r\n || operator === \"CA\"\r\n || operator === \"NA\"\r\n || operator === \"CO\"\r\n || operator === \"CN\") {\r\n continue;\r\n }\r\n const sources = c.findDirectExpressions(Expressions.Source);\r\n if (sources.length !== 2) {\r\n continue;\r\n }\r\n if (this.conf.onlyConstants === true) {\r\n if (this.isConstant(sources[0]) === true && this.isConstant(sources[1]) === false) {\r\n const start = sources[0].getFirstToken().getStart();\r\n const end = sources[1].getLastToken().getEnd();\r\n const issue = issue_1.Issue.atRange(file, start, end, \"No Yoda conditions\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n continue;\r\n }\r\n // Scenarios:\r\n // constant COMPARE chain\r\n // constant COMPARE multiple tokens with spaces\r\n // fieldChain COMPARE multiple tokens with spaces\r\n if ((this.withoutSpaces(sources[0]) === false && this.withoutSpaces(sources[1]) === true) || ((this.isConstant(sources[0]) === true && this.isFieldChain(sources[1]) === true))) {\r\n const start = sources[0].getFirstToken().getStart();\r\n const end = sources[1].getLastToken().getEnd();\r\n const issue = issue_1.Issue.atRange(file, start, end, \"No Yoda conditions\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n isConstant(node) {\r\n var _a;\r\n if (node.getChildren().length > 1) {\r\n return false;\r\n }\r\n return ((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Constant;\r\n }\r\n isFieldChain(node) {\r\n var _a;\r\n if (node.getChildren().length > 1) {\r\n return false;\r\n }\r\n return ((_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.FieldChain;\r\n }\r\n withoutSpaces(node) {\r\n return node.concatTokensWithoutStringsAndComments().includes(\" \");\r\n }\r\n}\r\nexports.NoYodaConditions = NoYodaConditions;\r\n//# sourceMappingURL=no_yoda_conditions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/no_yoda_conditions.js?");
12175
12186
 
12176
12187
  /***/ }),
12177
12188
 
@@ -12193,7 +12204,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12193
12204
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12194
12205
 
12195
12206
  "use strict";
12196
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObsoleteStatement = exports.ObsoleteStatementConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Check for REFRESH statement */\r\n this.refresh = true;\r\n /** Check for COMPUTE statement */\r\n this.compute = true;\r\n /** Check for ADD statement */\r\n this.add = true;\r\n /** Check for SUBTRACT statement */\r\n this.subtract = true;\r\n /** Check for MULTIPLY statement */\r\n this.multiply = true;\r\n /** Check for DIVIDE statement */\r\n this.divide = true;\r\n /** Check for MOVE statement */\r\n this.move = true;\r\n /** Checks for usages of IS REQUESTED */\r\n this.requested = true;\r\n /** Checks for usages of OCCURS */\r\n this.occurs = true;\r\n /** Checks for SET EXTENDED CHECK */\r\n this.setExtended = true;\r\n /** Checks for WITH HEADER LINE */\r\n this.withHeaderLine = true;\r\n /** Checks for FIELD-SYMBOLS ... STRUCTURE */\r\n this.fieldSymbolStructure = true;\r\n /** Checks for TYPE-POOLS */\r\n this.typePools = true;\r\n /** Checks for addition LOAD */\r\n this.load = true;\r\n /** Checks for PARAMETER */\r\n this.parameter = true;\r\n /** Checks for RANGES */\r\n this.ranges = true;\r\n /** Checks for COMMUNICATION */\r\n this.communication = true;\r\n /** Checks for PACK */\r\n this.pack = true;\r\n /** Checks for SELECT without INTO */\r\n this.selectWithoutInto = true;\r\n /** FREE MEMORY, without ID */\r\n this.freeMemory = true;\r\n /** Checks for EXIT FROM SQL */\r\n this.exitFromSQL = true;\r\n /** Checks for SORT itab BY <fs> */\r\n this.sortByFS = true;\r\n /** Checks for CALL TRANSFORMATION OBJECTS */\r\n this.callTransformation = true;\r\n /** Check for POSIX REGEX usage */\r\n this.regex = true;\r\n /** Check for OCCURENCES vs OCCURRENCES usage */\r\n this.occurences = true;\r\n }\r\n}\r\nexports.ObsoleteStatementConf = ObsoleteStatementConf;\r\nclass ObsoleteStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ObsoleteStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"obsolete_statement\",\r\n title: \"Obsolete statements\",\r\n shortDescription: `Checks for usages of certain obsolete statements`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],\r\n extendedInformation: `\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements\n\nSET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm\n\nIS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm\n\nWITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm\n\nFIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm\n\nTYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm\n\nLOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm\n\nCOMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm\n\nOCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm\n\nPARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm\n\nRANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm\n\nPACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm\n\nMOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm\n\nSELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm\nSELECT COUNT(*) is considered okay\n\nFREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm\n\nSORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm\n\nCALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm\n\nPOSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm\n\nOCCURENCES: check for OCCURENCES vs OCCURRENCES`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b, _c;\r\n const issues = [];\r\n const statements = file.getStatements();\r\n let prev = undefined;\r\n const configVersion = this.reg.getConfig().getVersion();\r\n for (const staNode of statements) {\r\n const sta = staNode.get();\r\n if ((sta instanceof Statements.Refresh && this.conf.refresh)\r\n || (sta instanceof Statements.Compute && this.conf.compute)\r\n || (sta instanceof Statements.Add && this.conf.add)\r\n || (sta instanceof Statements.Subtract && this.conf.subtract)\r\n || (sta instanceof Statements.ClassDefinitionLoad && this.conf.load && configVersion >= version_1.Version.v702)\r\n || (sta instanceof Statements.InterfaceLoad && this.conf.load && configVersion >= version_1.Version.v702)\r\n || (sta instanceof Statements.Multiply && this.conf.multiply)\r\n || (sta instanceof Statements.Divide && this.conf.divide)\r\n || (sta instanceof Statements.Move && this.conf.move\r\n && staNode.getTokens()[0].getStr().toUpperCase() === \"MOVE\"\r\n && staNode.getTokens()[1].getStr() !== \"-\"\r\n && staNode.getTokens()[1].getStr().toUpperCase() !== \"EXACT\")) {\r\n if (prev === undefined || staNode.getStart().getCol() !== prev.getCol() || staNode.getStart().getRow() !== prev.getRow()) {\r\n const message = \"Statement \\\"\" + staNode.getFirstToken().getStr() + \"\\\" is obsolete\";\r\n const fix = this.getFix(file, sta, staNode);\r\n const issue = issue_1.Issue.atStatement(file, staNode, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n prev = staNode.getStart();\r\n }\r\n if (this.conf.setExtended && sta instanceof Statements.SetExtendedCheck) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"SET EXTENDED CHECK is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.communication && sta instanceof Statements.Communication) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"COMMUNICATION is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.pack && sta instanceof Statements.Pack) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"PACK is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.parameter && sta instanceof Statements.Parameter) {\r\n const token = staNode.getFirstToken();\r\n if (token.getStr().toUpperCase() === \"PARAMETER\") {\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"PARAMETERS\");\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use PARAMETERS instead of PARAMETER\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.ranges && sta instanceof Statements.Ranges) {\r\n const children = staNode.getChildren();\r\n let fix = undefined;\r\n if (children.length === 5) {\r\n const simpleNameString = children[1].concatTokens();\r\n const fieldSubString = children[3].concatTokens();\r\n const replacement = \"TYPES \" + simpleNameString + \" LIKE RANGE OF \" + fieldSubString + \".\";\r\n fix = edit_helper_1.EditHelper.replaceRange(file, staNode.getStart(), staNode.getEnd(), replacement);\r\n }\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use LIKE RANGE OF instead of RANGES\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n if (this.conf.selectWithoutInto\r\n && (sta instanceof Statements.Select || sta instanceof Statements.SelectLoop)\r\n && staNode.findFirstExpression(Expressions.SQLIntoStructure) === undefined\r\n && staNode.findFirstExpression(Expressions.SQLIntoTable) === undefined) {\r\n const concat = (_a = staNode.findFirstExpression(Expressions.SQLFieldList)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (concat !== \"COUNT(*)\" && concat !== \"COUNT( * )\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"SELECT without INTO\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.requested && sta instanceof Statements.If) {\r\n for (const compare of staNode.findAllExpressions(Expressions.Compare)) {\r\n const token = compare.findDirectTokenByText(\"REQUESTED\");\r\n if (token) {\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"SUPPLIED\");\r\n const issue = issue_1.Issue.atToken(file, token, \"IS REQUESTED is obsolete\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.occurs) {\r\n if ((sta instanceof Statements.Describe)\r\n || (sta instanceof Statements.Ranges)\r\n || (sta instanceof Statements.DataBegin)\r\n || (sta instanceof Statements.TypeBegin)) {\r\n const token = staNode.findDirectTokenByText(\"OCCURS\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"OCCURS is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const dataDef of staNode.findAllExpressions(Expressions.DataDefinition)) {\r\n const token = (_b = dataDef.findDirectExpression(Expressions.TypeTable)) === null || _b === void 0 ? void 0 : _b.findDirectTokenByText(\"OCCURS\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"OCCURS is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.withHeaderLine === true && sta instanceof Statements.Data) {\r\n if (staNode.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\")) {\r\n const token = staNode.getFirstToken();\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"WITH HEADER LINE is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.fieldSymbolStructure && sta instanceof Statements.FieldSymbol) {\r\n const token = staNode.findDirectTokenByText(\"STRUCTURE\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"FIELD-SYMBOLS ... STRUCTURE is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.typePools && sta instanceof Statements.TypePools && configVersion >= version_1.Version.v702) {\r\n const fix = edit_helper_1.EditHelper.deleteStatement(file, staNode);\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"TYPE-POOLS\\\" is obsolete\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n if (this.conf.freeMemory && sta instanceof Statements.FreeMemory) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat === \"FREE MEMORY.\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"FREE MEMORY\\\" without ID is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.exitFromSQL && sta instanceof Statements.Exit) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat === \"EXIT FROM SQL.\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"EXIT FROM SQL\\\" is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.sortByFS && sta instanceof Statements.Sort) {\r\n const afterBy = staNode.findExpressionAfterToken(\"BY\");\r\n if (afterBy instanceof nodes_1.ExpressionNode && afterBy.get() instanceof expressions_1.SourceFieldSymbol) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"SORT itab BY <fs>\\\" is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.callTransformation && sta instanceof Statements.CallTransformation) {\r\n const objects = staNode.findExpressionAfterToken(\"OBJECTS\");\r\n if (objects) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use PARAMETERS instead of OBJECTS\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.occurences && sta instanceof Statements.Replace) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat.includes(\" OCCURENCES \")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use \\\"OCCURRENCES\\\"\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (configVersion >= version_1.Version.v756 && this.conf.regex) {\r\n if (sta instanceof Statements.Find || sta instanceof Statements.Replace) {\r\n if ((_c = staNode.findFirstExpression(Expressions.FindType)) === null || _c === void 0 ? void 0 : _c.concatTokens().includes(\"REGEX\")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"REGEX obsolete, use PCRE\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n else {\r\n const classNameExpression = staNode.findAllExpressions(Expressions.ClassName);\r\n const methodNameExpression = staNode.findAllExpressions(Expressions.MethodName);\r\n if (classNameExpression.length !== 0 && methodNameExpression.length !== 0) {\r\n const className = classNameExpression[0].concatTokens();\r\n const methodName = methodNameExpression[0].concatTokens();\r\n if (className === \"cl_abap_regex\") {\r\n if (methodName === \"create_posix\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"create_posix obsolete, use create_pcre\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n else if (className === \"cl_abap_matcher\") {\r\n if (methodName.includes(\"posix\")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"posix methods obsolete, use pcre methods\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, statementNode) {\r\n if (statement instanceof Statements.Refresh) {\r\n if (statementNode.getChildren().length === 6) {\r\n return undefined;\r\n }\r\n return edit_helper_1.EditHelper.replaceToken(file, statementNode.getFirstToken(), \"CLEAR\");\r\n }\r\n else if (statement instanceof Statements.Compute) {\r\n const children = statementNode.getChildren();\r\n if (children.length === 5) {\r\n const tokenForDeletion = statementNode.getFirstToken();\r\n let endPosition = tokenForDeletion.getEnd();\r\n endPosition = new position_1.Position(endPosition.getRow(), endPosition.getCol() + 1);\r\n return edit_helper_1.EditHelper.deleteRange(file, tokenForDeletion.getStart(), endPosition);\r\n }\r\n else {\r\n const targetString = children[2].concatTokens();\r\n const sourceString = children[4].concatTokens();\r\n const replacement = targetString + \" = EXACT #( \" + sourceString + \" ).\";\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n }\r\n else if (statement instanceof Statements.Add ||\r\n statement instanceof Statements.Subtract) {\r\n const children = statementNode.getChildren();\r\n const sourceString = children[1].concatTokens();\r\n const targetString = children[3].concatTokens();\r\n let replacement = \"\";\r\n if (statement instanceof Statements.Add) {\r\n replacement = targetString + \" = \" + targetString + \" + \" + sourceString + \".\";\r\n }\r\n else if (statement instanceof Statements.Subtract) {\r\n replacement = targetString + \" = \" + targetString + \" - \" + sourceString + \".\";\r\n }\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.Multiply ||\r\n statement instanceof Statements.Divide) {\r\n const children = statementNode.getChildren();\r\n const targetString = children[1].concatTokens();\r\n const sourceString = children[3].concatTokens();\r\n let replacement = \"\";\r\n if (statement instanceof Statements.Multiply) {\r\n replacement = targetString + \" = \" + targetString + \" * \" + sourceString + \".\";\r\n }\r\n else if (statement instanceof Statements.Divide) {\r\n replacement = targetString + \" = \" + targetString + \" / \" + sourceString + \".\";\r\n }\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.Move) {\r\n if (statementNode.getColon() !== undefined) {\r\n return undefined;\r\n }\r\n const children = statementNode.getChildren();\r\n const sourceString = children[1].concatTokens();\r\n const targetString = children[3].concatTokens();\r\n let operator = children[2].concatTokens();\r\n if (operator === \"TO\") {\r\n operator = \" = \";\r\n }\r\n else {\r\n operator = \" ?= \";\r\n }\r\n const replacement = targetString + operator + sourceString + \".\";\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.ClassDefinitionLoad ||\r\n statement instanceof Statements.InterfaceLoad) {\r\n let token = undefined;\r\n if (statement instanceof Statements.ClassDefinitionLoad) {\r\n token = statementNode.getChildren()[3].getFirstToken();\r\n }\r\n else {\r\n token = statementNode.getChildren()[2].getFirstToken();\r\n }\r\n let startPosition = token.getStart();\r\n startPosition = new position_1.Position(startPosition.getRow(), startPosition.getCol() - 1);\r\n return edit_helper_1.EditHelper.deleteRange(file, startPosition, token.getEnd());\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ObsoleteStatement = ObsoleteStatement;\r\n//# sourceMappingURL=obsolete_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js?");
12207
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ObsoleteStatement = exports.ObsoleteStatementConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nclass ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Check for REFRESH statement */\r\n this.refresh = true;\r\n /** Check for COMPUTE statement */\r\n this.compute = true;\r\n /** Check for ADD statement */\r\n this.add = true;\r\n /** Check for SUBTRACT statement */\r\n this.subtract = true;\r\n /** Check for MULTIPLY statement */\r\n this.multiply = true;\r\n /** Check for DIVIDE statement */\r\n this.divide = true;\r\n /** Check for MOVE statement */\r\n this.move = true;\r\n /** Checks for usages of IS REQUESTED */\r\n this.requested = true;\r\n /** Checks for usages of OCCURS */\r\n this.occurs = true;\r\n /** Checks for SET EXTENDED CHECK */\r\n this.setExtended = true;\r\n /** Checks for WITH HEADER LINE */\r\n this.withHeaderLine = true;\r\n /** Checks for FIELD-SYMBOLS ... STRUCTURE */\r\n this.fieldSymbolStructure = true;\r\n /** Checks for TYPE-POOLS */\r\n this.typePools = true;\r\n /** Checks for addition LOAD */\r\n this.load = true;\r\n /** Checks for PARAMETER */\r\n this.parameter = true;\r\n /** Checks for RANGES */\r\n this.ranges = true;\r\n /** Checks for COMMUNICATION */\r\n this.communication = true;\r\n /** Checks for PACK */\r\n this.pack = true;\r\n /** Checks for SELECT without INTO */\r\n this.selectWithoutInto = true;\r\n /** FREE MEMORY, without ID */\r\n this.freeMemory = true;\r\n /** Checks for EXIT FROM SQL */\r\n this.exitFromSQL = true;\r\n /** Checks for SORT itab BY <fs> */\r\n this.sortByFS = true;\r\n /** Checks for CALL TRANSFORMATION OBJECTS */\r\n this.callTransformation = true;\r\n /** Check for POSIX REGEX usage */\r\n this.regex = true;\r\n /** Check for OCCURENCES vs OCCURRENCES usage */\r\n this.occurences = true;\r\n }\r\n}\r\nexports.ObsoleteStatementConf = ObsoleteStatementConf;\r\nclass ObsoleteStatement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ObsoleteStatementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"obsolete_statement\",\r\n title: \"Obsolete statements\",\r\n shortDescription: `Checks for usages of certain obsolete statements`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],\r\n extendedInformation: `\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-functional-to-procedural-language-constructs\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obsolete-language-elements\r\n\r\nSET EXTENDED CHECK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapset_extended_check.htm\r\n\r\nIS REQUESTED: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenlogexp_requested.htm\r\n\r\nWITH HEADER LINE: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abapdata_header_line.htm\r\n\r\nFIELD-SYMBOLS STRUCTURE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapfield-symbols_obsolete_typing.htm\r\n\r\nTYPE-POOLS: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm\r\n\r\nLOAD addition: from 702, https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abennews-71-program_load.htm\r\n\r\nCOMMUICATION: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapcommunication.htm\r\n\r\nOCCURS: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapdata_occurs.htm\r\n\r\nPARAMETER: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapparameter.htm\r\n\r\nRANGES: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapranges.htm\r\n\r\nPACK: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abappack.htm\r\n\r\nMOVE: https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapmove_obs.htm\r\n\r\nSELECT without INTO: https://help.sap.com/doc/abapdocu_731_index_htm/7.31/en-US/abapselect_obsolete.htm\r\nSELECT COUNT(*) is considered okay\r\n\r\nFREE MEMORY: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abapfree_mem_id_obsolete.htm\r\n\r\nSORT BY FS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapsort_itab_obsolete.htm\r\n\r\nCALL TRANSFORMATION OBJECTS: https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-US/abapcall_transformation_objects.htm\r\n\r\nPOSIX REGEX: https://help.sap.com/doc/abapdocu_755_index_htm/7.55/en-US/index.htm\r\n\r\nOCCURENCES: check for OCCURENCES vs OCCURRENCES`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b, _c;\r\n const issues = [];\r\n const statements = file.getStatements();\r\n let prev = undefined;\r\n const configVersion = this.reg.getConfig().getVersion();\r\n for (const staNode of statements) {\r\n const sta = staNode.get();\r\n if ((sta instanceof Statements.Refresh && this.conf.refresh)\r\n || (sta instanceof Statements.Compute && this.conf.compute)\r\n || (sta instanceof Statements.Add && this.conf.add)\r\n || (sta instanceof Statements.Subtract && this.conf.subtract)\r\n || (sta instanceof Statements.ClassDefinitionLoad && this.conf.load && configVersion >= version_1.Version.v702)\r\n || (sta instanceof Statements.InterfaceLoad && this.conf.load && configVersion >= version_1.Version.v702)\r\n || (sta instanceof Statements.Multiply && this.conf.multiply)\r\n || (sta instanceof Statements.Divide && this.conf.divide)\r\n || (sta instanceof Statements.Move && this.conf.move\r\n && staNode.getTokens()[0].getStr().toUpperCase() === \"MOVE\"\r\n && staNode.getTokens()[1].getStr() !== \"-\"\r\n && staNode.getTokens()[1].getStr().toUpperCase() !== \"EXACT\")) {\r\n if (prev === undefined || staNode.getStart().getCol() !== prev.getCol() || staNode.getStart().getRow() !== prev.getRow()) {\r\n const message = \"Statement \\\"\" + staNode.getFirstToken().getStr() + \"\\\" is obsolete\";\r\n const fix = this.getFix(file, sta, staNode);\r\n const issue = issue_1.Issue.atStatement(file, staNode, message, this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n prev = staNode.getStart();\r\n }\r\n if (this.conf.setExtended && sta instanceof Statements.SetExtendedCheck) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"SET EXTENDED CHECK is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.communication && sta instanceof Statements.Communication) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"COMMUNICATION is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.pack && sta instanceof Statements.Pack) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"PACK is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n if (this.conf.parameter && sta instanceof Statements.Parameter) {\r\n const token = staNode.getFirstToken();\r\n if (token.getStr().toUpperCase() === \"PARAMETER\") {\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"PARAMETERS\");\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use PARAMETERS instead of PARAMETER\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.ranges && sta instanceof Statements.Ranges) {\r\n const children = staNode.getChildren();\r\n let fix = undefined;\r\n if (children.length === 5) {\r\n const simpleNameString = children[1].concatTokens();\r\n const fieldSubString = children[3].concatTokens();\r\n const replacement = \"TYPES \" + simpleNameString + \" LIKE RANGE OF \" + fieldSubString + \".\";\r\n fix = edit_helper_1.EditHelper.replaceRange(file, staNode.getStart(), staNode.getEnd(), replacement);\r\n }\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use LIKE RANGE OF instead of RANGES\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n if (this.conf.selectWithoutInto\r\n && (sta instanceof Statements.Select || sta instanceof Statements.SelectLoop)\r\n && staNode.findFirstExpression(Expressions.SQLIntoStructure) === undefined\r\n && staNode.findFirstExpression(Expressions.SQLIntoTable) === undefined) {\r\n const concat = (_a = staNode.findFirstExpression(Expressions.SQLFieldList)) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase();\r\n if (concat !== \"COUNT(*)\" && concat !== \"COUNT( * )\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"SELECT without INTO\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.requested && sta instanceof Statements.If) {\r\n for (const compare of staNode.findAllExpressions(Expressions.Compare)) {\r\n const token = compare.findDirectTokenByText(\"REQUESTED\");\r\n if (token) {\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"SUPPLIED\");\r\n const issue = issue_1.Issue.atToken(file, token, \"IS REQUESTED is obsolete\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.occurs) {\r\n if ((sta instanceof Statements.Describe)\r\n || (sta instanceof Statements.Ranges)\r\n || (sta instanceof Statements.DataBegin)\r\n || (sta instanceof Statements.TypeBegin)) {\r\n const token = staNode.findDirectTokenByText(\"OCCURS\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"OCCURS is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n for (const dataDef of staNode.findAllExpressions(Expressions.DataDefinition)) {\r\n const token = (_b = dataDef.findDirectExpression(Expressions.TypeTable)) === null || _b === void 0 ? void 0 : _b.findDirectTokenByText(\"OCCURS\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"OCCURS is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.withHeaderLine === true && sta instanceof Statements.Data) {\r\n if (staNode.concatTokens().toUpperCase().includes(\"WITH HEADER LINE\")) {\r\n const token = staNode.getFirstToken();\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"WITH HEADER LINE is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n if (this.conf.fieldSymbolStructure && sta instanceof Statements.FieldSymbol) {\r\n const token = staNode.findDirectTokenByText(\"STRUCTURE\");\r\n if (token) {\r\n const issue = issue_1.Issue.atToken(file, token, \"FIELD-SYMBOLS ... STRUCTURE is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.typePools && sta instanceof Statements.TypePools && configVersion >= version_1.Version.v702) {\r\n const fix = edit_helper_1.EditHelper.deleteStatement(file, staNode);\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"TYPE-POOLS\\\" is obsolete\", this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n if (this.conf.freeMemory && sta instanceof Statements.FreeMemory) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat === \"FREE MEMORY.\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"FREE MEMORY\\\" without ID is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.exitFromSQL && sta instanceof Statements.Exit) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat === \"EXIT FROM SQL.\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"EXIT FROM SQL\\\" is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.sortByFS && sta instanceof Statements.Sort) {\r\n const afterBy = staNode.findExpressionAfterToken(\"BY\");\r\n if (afterBy instanceof nodes_1.ExpressionNode && afterBy.get() instanceof expressions_1.SourceFieldSymbol) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Statement \\\"SORT itab BY <fs>\\\" is obsolete\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.callTransformation && sta instanceof Statements.CallTransformation) {\r\n const objects = staNode.findExpressionAfterToken(\"OBJECTS\");\r\n if (objects) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use PARAMETERS instead of OBJECTS\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.conf.occurences && sta instanceof Statements.Replace) {\r\n const concat = staNode.concatTokens().toUpperCase();\r\n if (concat.includes(\" OCCURENCES \")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"Use \\\"OCCURRENCES\\\"\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (configVersion >= version_1.Version.v756 && this.conf.regex) {\r\n if (sta instanceof Statements.Find || sta instanceof Statements.Replace) {\r\n if ((_c = staNode.findFirstExpression(Expressions.FindType)) === null || _c === void 0 ? void 0 : _c.concatTokens().includes(\"REGEX\")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"REGEX obsolete, use PCRE\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n else {\r\n const classNameExpression = staNode.findAllExpressions(Expressions.ClassName);\r\n const methodNameExpression = staNode.findAllExpressions(Expressions.MethodName);\r\n if (classNameExpression.length !== 0 && methodNameExpression.length !== 0) {\r\n const className = classNameExpression[0].concatTokens();\r\n const methodName = methodNameExpression[0].concatTokens();\r\n if (className === \"cl_abap_regex\") {\r\n if (methodName === \"create_posix\") {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"create_posix obsolete, use create_pcre\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n else if (className === \"cl_abap_matcher\") {\r\n if (methodName.includes(\"posix\")) {\r\n const issue = issue_1.Issue.atStatement(file, staNode, \"posix methods obsolete, use pcre methods\", this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, statementNode) {\r\n if (statement instanceof Statements.Refresh) {\r\n if (statementNode.getChildren().length === 6) {\r\n return undefined;\r\n }\r\n return edit_helper_1.EditHelper.replaceToken(file, statementNode.getFirstToken(), \"CLEAR\");\r\n }\r\n else if (statement instanceof Statements.Compute) {\r\n const children = statementNode.getChildren();\r\n if (children.length === 5) {\r\n const tokenForDeletion = statementNode.getFirstToken();\r\n let endPosition = tokenForDeletion.getEnd();\r\n endPosition = new position_1.Position(endPosition.getRow(), endPosition.getCol() + 1);\r\n return edit_helper_1.EditHelper.deleteRange(file, tokenForDeletion.getStart(), endPosition);\r\n }\r\n else {\r\n const targetString = children[2].concatTokens();\r\n const sourceString = children[4].concatTokens();\r\n const replacement = targetString + \" = EXACT #( \" + sourceString + \" ).\";\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n }\r\n else if (statement instanceof Statements.Add ||\r\n statement instanceof Statements.Subtract) {\r\n const children = statementNode.getChildren();\r\n const sourceString = children[1].concatTokens();\r\n const targetString = children[3].concatTokens();\r\n let replacement = \"\";\r\n if (statement instanceof Statements.Add) {\r\n replacement = targetString + \" = \" + targetString + \" + \" + sourceString + \".\";\r\n }\r\n else if (statement instanceof Statements.Subtract) {\r\n replacement = targetString + \" = \" + targetString + \" - \" + sourceString + \".\";\r\n }\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.Multiply ||\r\n statement instanceof Statements.Divide) {\r\n const children = statementNode.getChildren();\r\n const targetString = children[1].concatTokens();\r\n const sourceString = children[3].concatTokens();\r\n let replacement = \"\";\r\n if (statement instanceof Statements.Multiply) {\r\n replacement = targetString + \" = \" + targetString + \" * \" + sourceString + \".\";\r\n }\r\n else if (statement instanceof Statements.Divide) {\r\n replacement = targetString + \" = \" + targetString + \" / \" + sourceString + \".\";\r\n }\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.Move) {\r\n if (statementNode.getColon() !== undefined) {\r\n return undefined;\r\n }\r\n const children = statementNode.getChildren();\r\n const sourceString = children[1].concatTokens();\r\n const targetString = children[3].concatTokens();\r\n let operator = children[2].concatTokens();\r\n if (operator === \"TO\") {\r\n operator = \" = \";\r\n }\r\n else {\r\n operator = \" ?= \";\r\n }\r\n const replacement = targetString + operator + sourceString + \".\";\r\n return edit_helper_1.EditHelper.replaceRange(file, statementNode.getStart(), statementNode.getEnd(), replacement);\r\n }\r\n else if (statement instanceof Statements.ClassDefinitionLoad ||\r\n statement instanceof Statements.InterfaceLoad) {\r\n let token = undefined;\r\n if (statement instanceof Statements.ClassDefinitionLoad) {\r\n token = statementNode.getChildren()[3].getFirstToken();\r\n }\r\n else {\r\n token = statementNode.getChildren()[2].getFirstToken();\r\n }\r\n let startPosition = token.getStart();\r\n startPosition = new position_1.Position(startPosition.getRow(), startPosition.getCol() - 1);\r\n return edit_helper_1.EditHelper.deleteRange(file, startPosition, token.getEnd());\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ObsoleteStatement = ObsoleteStatement;\r\n//# sourceMappingURL=obsolete_statement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/obsolete_statement.js?");
12197
12208
 
12198
12209
  /***/ }),
12199
12210
 
@@ -12204,7 +12215,18 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12204
12215
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12205
12216
 
12206
12217
  "use strict";
12207
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OmitParameterName = exports.OmitParameterNameConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst method_definition_1 = __webpack_require__(/*! ../abap/types/method_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definition.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass OmitParameterNameConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.OmitParameterNameConf = OmitParameterNameConf;\r\nclass OmitParameterName {\r\n constructor() {\r\n this.conf = new OmitParameterNameConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"omit_parameter_name\",\r\n title: \"Omit parameter name\",\r\n shortDescription: `Omit the parameter name in single parameter calls`,\r\n extendedInformation: `\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls\n\nEXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],\r\n badExample: `method( param = 2 ).`,\r\n goodExample: `method( 2 ).`,\r\n };\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a, _b;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n continue;\r\n }\r\n for (const c of stru.findAllExpressions(Expressions.MethodCall)) {\r\n if (c.findFirstExpression(Expressions.MethodParameters)) {\r\n continue;\r\n }\r\n // hmm, this will break for nested method calls?\r\n const parameters = c.findAllExpressions(Expressions.ParameterS);\r\n if (parameters.length > 1 || parameters.length === 0) {\r\n continue;\r\n }\r\n const name = c.findDirectExpression(Expressions.MethodName);\r\n if (name === undefined) {\r\n continue;\r\n }\r\n const param = c.findDirectExpression(Expressions.MethodCallParam);\r\n if (param === undefined) {\r\n continue;\r\n }\r\n const ref = this.findMethodReference(name.getFirstToken(), spaghetti, file.getFilename());\r\n if (ref === undefined) {\r\n continue;\r\n }\r\n const i = ref.getParameters().getDefaultImporting();\r\n if (i === undefined) {\r\n continue;\r\n }\r\n const p = (_a = parameters[0].findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if ((p === null || p === void 0 ? void 0 : p.getStr().toUpperCase()) === i.toUpperCase()) {\r\n const message = \"Omit default parameter name \\\"\" + i + \"\\\"\";\r\n let fix = undefined;\r\n const end = (_b = parameters[0].findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStart();\r\n if (end) {\r\n fix = edit_helper_1.EditHelper.deleteRange(file, p.getStart(), end);\r\n }\r\n issues.push(issue_1.Issue.atToken(file, name.getFirstToken(), message, this.getMetadata().key, this.getConfig().severity, fix));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////\r\n findMethodReference(token, spaghetti, filename) {\r\n const scope = spaghetti.lookupPosition(token.getStart(), filename);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType !== _reference_1.ReferenceType.MethodReference) {\r\n continue;\r\n }\r\n else if (r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof method_definition_1.MethodDefinition) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.OmitParameterName = OmitParameterName;\r\n//# sourceMappingURL=omit_parameter_name.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js?");
12218
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OmitParameterName = exports.OmitParameterNameConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst method_definition_1 = __webpack_require__(/*! ../abap/types/method_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definition.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass OmitParameterNameConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.OmitParameterNameConf = OmitParameterNameConf;\r\nclass OmitParameterName {\r\n constructor() {\r\n this.conf = new OmitParameterNameConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"omit_parameter_name\",\r\n title: \"Omit parameter name\",\r\n shortDescription: `Omit the parameter name in single parameter calls`,\r\n extendedInformation: `\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-the-parameter-name-in-single-parameter-calls\r\n\r\nEXPORTING must already be omitted for this rule to take effect, https://rules.abaplint.org/exporting/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix],\r\n badExample: `method( param = 2 ).`,\r\n goodExample: `method( 2 ).`,\r\n };\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a, _b;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n continue;\r\n }\r\n for (const c of stru.findAllExpressions(Expressions.MethodCall)) {\r\n if (c.findFirstExpression(Expressions.MethodParameters)) {\r\n continue;\r\n }\r\n // hmm, this will break for nested method calls?\r\n const parameters = c.findAllExpressions(Expressions.ParameterS);\r\n if (parameters.length > 1 || parameters.length === 0) {\r\n continue;\r\n }\r\n const name = c.findDirectExpression(Expressions.MethodName);\r\n if (name === undefined) {\r\n continue;\r\n }\r\n const param = c.findDirectExpression(Expressions.MethodCallParam);\r\n if (param === undefined) {\r\n continue;\r\n }\r\n const ref = this.findMethodReference(name.getFirstToken(), spaghetti, file.getFilename());\r\n if (ref === undefined) {\r\n continue;\r\n }\r\n const i = ref.getParameters().getDefaultImporting();\r\n if (i === undefined) {\r\n continue;\r\n }\r\n const p = (_a = parameters[0].findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if ((p === null || p === void 0 ? void 0 : p.getStr().toUpperCase()) === i.toUpperCase()) {\r\n const message = \"Omit default parameter name \\\"\" + i + \"\\\"\";\r\n let fix = undefined;\r\n const end = (_b = parameters[0].findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStart();\r\n if (end) {\r\n fix = edit_helper_1.EditHelper.deleteRange(file, p.getStart(), end);\r\n }\r\n issues.push(issue_1.Issue.atToken(file, name.getFirstToken(), message, this.getMetadata().key, this.getConfig().severity, fix));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////\r\n findMethodReference(token, spaghetti, filename) {\r\n const scope = spaghetti.lookupPosition(token.getStart(), filename);\r\n if (scope === undefined) {\r\n return undefined;\r\n }\r\n for (const r of scope.getData().references) {\r\n if (r.referenceType !== _reference_1.ReferenceType.MethodReference) {\r\n continue;\r\n }\r\n else if (r.position.getStart().equals(token.getStart())\r\n && r.resolved instanceof method_definition_1.MethodDefinition) {\r\n return r.resolved;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.OmitParameterName = OmitParameterName;\r\n//# sourceMappingURL=omit_parameter_name.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_parameter_name.js?");
12219
+
12220
+ /***/ }),
12221
+
12222
+ /***/ "./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js":
12223
+ /*!*****************************************************************************!*\
12224
+ !*** ./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js ***!
12225
+ \*****************************************************************************/
12226
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12227
+
12228
+ "use strict";
12229
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OmitPrecedingZeros = exports.OmitPrecedingZerosConf = void 0;\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass OmitPrecedingZerosConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.OmitPrecedingZerosConf = OmitPrecedingZerosConf;\r\nclass OmitPrecedingZeros extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new OmitPrecedingZerosConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"omit_preceding_zeros\",\r\n title: \"Omit preceding zeros\",\r\n shortDescription: `Omit preceding zeros from integer constants`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `int = -001.`,\r\n goodExample: `int = -1.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n for (const i of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Integer)) || []) {\r\n const token = i.getLastToken();\r\n const str = token.getStr();\r\n if (str.length > 1 && str.startsWith(\"0\")) {\r\n const message = \"Omit preceding zeros\";\r\n const issue = issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.getConfig().severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.OmitPrecedingZeros = OmitPrecedingZeros;\r\n//# sourceMappingURL=omit_preceding_zeros.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_preceding_zeros.js?");
12208
12230
 
12209
12231
  /***/ }),
12210
12232
 
@@ -12215,7 +12237,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12215
12237
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12216
12238
 
12217
12239
  "use strict";
12218
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OmitReceiving = exports.OmitReceivingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nclass OmitReceivingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.OmitReceivingConf = OmitReceivingConf;\r\nclass OmitReceiving extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new OmitReceivingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"omit_receiving\",\r\n title: \"Omit RECEIVING\",\r\n shortDescription: `Omit RECEIVING`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `\n upload_pack(\n EXPORTING\n io_client = lo_client\n iv_url = iv_url\n iv_deepen_level = iv_deepen_level\n it_hashes = lt_hashes\n RECEIVING\n rt_objects = et_objects ).`,\r\n goodExample: `\n et_objects = upload_pack(\n io_client = lo_client\n iv_url = iv_url\n iv_deepen_level = iv_deepen_level\n it_hashes = lt_hashes ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n for (const e of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.MethodCallParam)) || []) {\r\n const p = e.findDirectExpression(Expressions.MethodParameters);\r\n if (p === undefined) {\r\n continue;\r\n }\r\n const r = p.findDirectTokenByText(\"RECEIVING\");\r\n if (r === undefined) {\r\n continue;\r\n }\r\n const ex = p.findDirectTokenByText(\"EXCEPTIONS\");\r\n if (ex !== undefined) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atToken(file, r, \"Omit RECEIVING\", this.getMetadata().key, this.getConfig().severity));\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.OmitReceiving = OmitReceiving;\r\n//# sourceMappingURL=omit_receiving.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_receiving.js?");
12240
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.OmitReceiving = exports.OmitReceivingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nclass OmitReceivingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.OmitReceivingConf = OmitReceivingConf;\r\nclass OmitReceiving extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new OmitReceivingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"omit_receiving\",\r\n title: \"Omit RECEIVING\",\r\n shortDescription: `Omit RECEIVING`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#omit-receiving`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `\r\n upload_pack(\r\n EXPORTING\r\n io_client = lo_client\r\n iv_url = iv_url\r\n iv_deepen_level = iv_deepen_level\r\n it_hashes = lt_hashes\r\n RECEIVING\r\n rt_objects = et_objects ).`,\r\n goodExample: `\r\n et_objects = upload_pack(\r\n io_client = lo_client\r\n iv_url = iv_url\r\n iv_deepen_level = iv_deepen_level\r\n it_hashes = lt_hashes ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n for (const e of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.MethodCallParam)) || []) {\r\n const p = e.findDirectExpression(Expressions.MethodParameters);\r\n if (p === undefined) {\r\n continue;\r\n }\r\n const r = p.findDirectTokenByText(\"RECEIVING\");\r\n if (r === undefined) {\r\n continue;\r\n }\r\n const ex = p.findDirectTokenByText(\"EXCEPTIONS\");\r\n if (ex !== undefined) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atToken(file, r, \"Omit RECEIVING\", this.getMetadata().key, this.getConfig().severity));\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.OmitReceiving = OmitReceiving;\r\n//# sourceMappingURL=omit_receiving.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/omit_receiving.js?");
12219
12241
 
12220
12242
  /***/ }),
12221
12243
 
@@ -12226,7 +12248,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12226
12248
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12227
12249
 
12228
12250
  "use strict";
12229
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Parser702Chaining = exports.Parser702ChainingConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Parser702ChainingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.Parser702ChainingConf = Parser702ChainingConf;\r\nclass Parser702Chaining extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new Parser702ChainingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_702_chaining\",\r\n title: \"Parser Error, bad chanining on 702\",\r\n shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,\nthis rule finds these and reports errors.\nOnly active on target version 702 and below.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() !== version_1.Version.v702\r\n && this.reg.getConfig().getVersion() !== version_1.Version.v700) {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const chain of stru.findAllExpressions(Expressions.MethodCallChain)) {\r\n const calls = chain.findDirectExpressions(Expressions.MethodCall);\r\n if (calls.length < 2) {\r\n continue;\r\n }\r\n for (const call of calls) {\r\n const callParam = call.findDirectExpression(Expressions.MethodCallParam);\r\n if (callParam === undefined) {\r\n continue;\r\n }\r\n const param = callParam.findDirectExpression(Expressions.MethodParameters);\r\n if (param === undefined) {\r\n continue;\r\n }\r\n if (param.findDirectTokenByText(\"IMPORTING\")\r\n || param.findDirectTokenByText(\"CHANGING\")\r\n || param.findDirectTokenByText(\"EXCEPTIONS\")) {\r\n const message = \"This kind of method chaining not possible in 702\";\r\n const issue = issue_1.Issue.atPosition(file, param.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Parser702Chaining = Parser702Chaining;\r\n//# sourceMappingURL=parser_702_chaining.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js?");
12251
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Parser702Chaining = exports.Parser702ChainingConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass Parser702ChainingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.Parser702ChainingConf = Parser702ChainingConf;\r\nclass Parser702Chaining extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new Parser702ChainingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_702_chaining\",\r\n title: \"Parser Error, bad chanining on 702\",\r\n shortDescription: `ABAP on 702 does not allow for method chaining with IMPORTING/EXPORTING/CHANGING keywords,\r\nthis rule finds these and reports errors.\r\nOnly active on target version 702 and below.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() !== version_1.Version.v702\r\n && this.reg.getConfig().getVersion() !== version_1.Version.v700) {\r\n return [];\r\n }\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const chain of stru.findAllExpressions(Expressions.MethodCallChain)) {\r\n const calls = chain.findDirectExpressions(Expressions.MethodCall);\r\n if (calls.length < 2) {\r\n continue;\r\n }\r\n for (const call of calls) {\r\n const callParam = call.findDirectExpression(Expressions.MethodCallParam);\r\n if (callParam === undefined) {\r\n continue;\r\n }\r\n const param = callParam.findDirectExpression(Expressions.MethodParameters);\r\n if (param === undefined) {\r\n continue;\r\n }\r\n if (param.findDirectTokenByText(\"IMPORTING\")\r\n || param.findDirectTokenByText(\"CHANGING\")\r\n || param.findDirectTokenByText(\"EXCEPTIONS\")) {\r\n const message = \"This kind of method chaining not possible in 702\";\r\n const issue = issue_1.Issue.atPosition(file, param.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.Parser702Chaining = Parser702Chaining;\r\n//# sourceMappingURL=parser_702_chaining.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_702_chaining.js?");
12230
12252
 
12231
12253
  /***/ }),
12232
12254
 
@@ -12237,7 +12259,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12237
12259
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12238
12260
 
12239
12261
  "use strict";
12240
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserError = exports.ParserErrorConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ../abap/2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass ParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserErrorConf = ParserErrorConf;\r\nclass ParserError extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ParserErrorConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_error\",\r\n title: \"Parser error\",\r\n shortDescription: `Checks for syntax not recognized by abaplint.\n\nSee recognized syntax at https://syntax.abaplint.org`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const statement of file.getStatements()) {\r\n if (!(statement.get() instanceof _statement_1.Unknown)) {\r\n continue;\r\n }\r\n if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {\r\n const message = \"Statement too long, refactor statement\";\r\n const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else {\r\n const tok = statement.getFirstToken();\r\n const message = \"Statement does not exist in ABAP\" + this.reg.getConfig().getVersion() + \"(or a parser error), \\\"\" + tok.getStr() + \"\\\"\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.reg.getConfig().getVersion() === version_1.Version.v700) {\r\n for (const statement of file.getStatements()) {\r\n if (statement.getPragmas().length > 0) {\r\n const message = \"Pragmas not allowed in v700\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ParserError = ParserError;\r\n//# sourceMappingURL=parser_error.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_error.js?");
12262
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserError = exports.ParserErrorConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst statement_parser_1 = __webpack_require__(/*! ../abap/2_statements/statement_parser */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nclass ParserErrorConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserErrorConf = ParserErrorConf;\r\nclass ParserError extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ParserErrorConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_error\",\r\n title: \"Parser error\",\r\n shortDescription: `Checks for syntax not recognized by abaplint.\r\n\r\nSee recognized syntax at https://syntax.abaplint.org`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const statement of file.getStatements()) {\r\n if (!(statement.get() instanceof _statement_1.Unknown)) {\r\n continue;\r\n }\r\n if (statement.getTokens().length > statement_parser_1.STATEMENT_MAX_TOKENS) {\r\n const message = \"Statement too long, refactor statement\";\r\n const issue = issue_1.Issue.atToken(file, statement.getTokens()[0], message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n else {\r\n const tok = statement.getFirstToken();\r\n const message = \"Statement does not exist in ABAP\" + this.reg.getConfig().getVersion() + \"(or a parser error), \\\"\" + tok.getStr() + \"\\\"\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n if (this.reg.getConfig().getVersion() === version_1.Version.v700) {\r\n for (const statement of file.getStatements()) {\r\n if (statement.getPragmas().length > 0) {\r\n const message = \"Pragmas not allowed in v700\";\r\n const issue = issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.ParserError = ParserError;\r\n//# sourceMappingURL=parser_error.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_error.js?");
12241
12263
 
12242
12264
  /***/ }),
12243
12265
 
@@ -12248,7 +12270,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12248
12270
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12249
12271
 
12250
12272
  "use strict";
12251
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserMissingSpace = exports.ParserMissingSpaceConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\n// todo: this rule needs refactoring\r\nclass ParserMissingSpaceConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserMissingSpaceConf = ParserMissingSpaceConf;\r\nclass ParserMissingSpace extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ParserMissingSpaceConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_missing_space\",\r\n title: \"Parser Error, missing space\",\r\n shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.\nThis rule makes sure the spaces are consistently required across the language.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],\r\n badExample: `IF ( foo = 'bar').`,\r\n goodExample: `IF ( foo = 'bar' ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let start = new position_1.Position(0, 0);\r\n for (const statement of file.getStatements()) {\r\n const missing = this.missingSpace(statement);\r\n if (missing) {\r\n const message = \"Missing space between string or character literal and parentheses\";\r\n start = missing;\r\n const issue = issue_1.Issue.atPosition(file, start, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n missingSpace(statement) {\r\n const found = statement.findAllExpressionsMulti([Expressions.CondSub, Expressions.SQLCond,\r\n Expressions.ValueBody, Expressions.NewObject, Expressions.Cond,\r\n Expressions.ComponentCond, Expressions.MethodCallParam], true);\r\n let pos = undefined;\r\n for (const f of found) {\r\n const type = f.get();\r\n if (type instanceof Expressions.CondSub) {\r\n pos = this.checkCondSub(f);\r\n }\r\n else if (type instanceof Expressions.ValueBody) {\r\n pos = this.checkValueBody(f);\r\n }\r\n else if (type instanceof Expressions.Cond) {\r\n pos = this.checkCond(f);\r\n }\r\n else if (type instanceof Expressions.ComponentCond) {\r\n pos = this.checkComponentCond(f);\r\n }\r\n else if (type instanceof Expressions.SQLCond) {\r\n pos = this.checkSQLCond(f);\r\n }\r\n else if (type instanceof Expressions.NewObject) {\r\n pos = this.checkNewObject(f);\r\n }\r\n else if (type instanceof Expressions.MethodCallParam) {\r\n pos = this.checkMethodCallParam(f);\r\n }\r\n if (pos) {\r\n return pos;\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkSQLCond(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.SQLCond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkNewObject(cond) {\r\n const children = cond.getChildren();\r\n {\r\n const first = children[children.length - 2].getLastToken();\r\n const second = children[children.length - 1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getEnd().getCol() === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkCondSub(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.Cond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkComponentCond(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.ComponentCond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkValueBody(vb) {\r\n var _a, _b;\r\n const children = vb.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n const current = children[i];\r\n if (current instanceof nodes_1.TokenNode) {\r\n const prev = (_a = children[i - 1]) === null || _a === void 0 ? void 0 : _a.getLastToken();\r\n const next = (_b = children[i + 1]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (current.getFirstToken().getStr() === \"(\"\r\n && next\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (current.getFirstToken().getStr() === \")\"\r\n && prev\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getEnd().getCol() === current.getFirstToken().getStart().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkCond(cond) {\r\n const children = cond.getAllTokens();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const current = children[i];\r\n const next = children[i + 1];\r\n if (next.getStr().startsWith(\"'\")\r\n && next.getRow() === current.getRow()\r\n && next.getCol() === current.getEnd().getCol()) {\r\n return current.getEnd();\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkMethodCallParam(call) {\r\n const children = call.getChildren();\r\n {\r\n const first = children[0].getFirstToken();\r\n const second = children[1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getCol() + 1 === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n {\r\n const first = children[children.length - 2].getLastToken();\r\n const second = children[children.length - 1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getEnd().getCol() === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ParserMissingSpace = ParserMissingSpace;\r\n//# sourceMappingURL=parser_missing_space.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js?");
12273
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ParserMissingSpace = exports.ParserMissingSpaceConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst nodes_1 = __webpack_require__(/*! ../abap/nodes */ \"./node_modules/@abaplint/core/build/src/abap/nodes/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\n// todo: this rule needs refactoring\r\nclass ParserMissingSpaceConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.ParserMissingSpaceConf = ParserMissingSpaceConf;\r\nclass ParserMissingSpace extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new ParserMissingSpaceConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"parser_missing_space\",\r\n title: \"Parser Error, missing space\",\r\n shortDescription: `In special cases the ABAP language allows for not having spaces before or after string literals.\r\nThis rule makes sure the spaces are consistently required across the language.`,\r\n tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.SingleFile],\r\n badExample: `IF ( foo = 'bar').`,\r\n goodExample: `IF ( foo = 'bar' ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let start = new position_1.Position(0, 0);\r\n for (const statement of file.getStatements()) {\r\n const missing = this.missingSpace(statement);\r\n if (missing) {\r\n const message = \"Missing space between string or character literal and parentheses\";\r\n start = missing;\r\n const issue = issue_1.Issue.atPosition(file, start, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n missingSpace(statement) {\r\n const found = statement.findAllExpressionsMulti([Expressions.CondSub, Expressions.SQLCond,\r\n Expressions.ValueBody, Expressions.NewObject, Expressions.Cond,\r\n Expressions.ComponentCond, Expressions.MethodCallParam], true);\r\n let pos = undefined;\r\n for (const f of found) {\r\n const type = f.get();\r\n if (type instanceof Expressions.CondSub) {\r\n pos = this.checkCondSub(f);\r\n }\r\n else if (type instanceof Expressions.ValueBody) {\r\n pos = this.checkValueBody(f);\r\n }\r\n else if (type instanceof Expressions.Cond) {\r\n pos = this.checkCond(f);\r\n }\r\n else if (type instanceof Expressions.ComponentCond) {\r\n pos = this.checkComponentCond(f);\r\n }\r\n else if (type instanceof Expressions.SQLCond) {\r\n pos = this.checkSQLCond(f);\r\n }\r\n else if (type instanceof Expressions.NewObject) {\r\n pos = this.checkNewObject(f);\r\n }\r\n else if (type instanceof Expressions.MethodCallParam) {\r\n pos = this.checkMethodCallParam(f);\r\n }\r\n if (pos) {\r\n return pos;\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkSQLCond(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.SQLCond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkNewObject(cond) {\r\n const children = cond.getChildren();\r\n {\r\n const first = children[children.length - 2].getLastToken();\r\n const second = children[children.length - 1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getEnd().getCol() === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkCondSub(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.Cond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkComponentCond(cond) {\r\n const children = cond.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n if (children[i].get() instanceof Expressions.ComponentCond) {\r\n const current = children[i];\r\n const prev = children[i - 1].getLastToken();\r\n const next = children[i + 1].getFirstToken();\r\n if (prev.getStr() === \"(\"\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getCol() + 1 === current.getFirstToken().getStart().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (next.getStr() === \")\"\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkValueBody(vb) {\r\n var _a, _b;\r\n const children = vb.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n const current = children[i];\r\n if (current instanceof nodes_1.TokenNode) {\r\n const prev = (_a = children[i - 1]) === null || _a === void 0 ? void 0 : _a.getLastToken();\r\n const next = (_b = children[i + 1]) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (current.getFirstToken().getStr() === \"(\"\r\n && next\r\n && next.getRow() === current.getLastToken().getRow()\r\n && next.getCol() === current.getLastToken().getEnd().getCol()) {\r\n return current.getFirstToken().getStart();\r\n }\r\n if (current.getFirstToken().getStr() === \")\"\r\n && prev\r\n && prev.getRow() === current.getFirstToken().getRow()\r\n && prev.getEnd().getCol() === current.getFirstToken().getStart().getCol()) {\r\n return current.getLastToken().getEnd();\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkCond(cond) {\r\n const children = cond.getAllTokens();\r\n for (let i = 0; i < children.length - 1; i++) {\r\n const current = children[i];\r\n const next = children[i + 1];\r\n if (next.getStr().startsWith(\"'\")\r\n && next.getRow() === current.getRow()\r\n && next.getCol() === current.getEnd().getCol()) {\r\n return current.getEnd();\r\n }\r\n }\r\n return undefined;\r\n }\r\n checkMethodCallParam(call) {\r\n const children = call.getChildren();\r\n {\r\n const first = children[0].getFirstToken();\r\n const second = children[1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getCol() + 1 === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n {\r\n const first = children[children.length - 2].getLastToken();\r\n const second = children[children.length - 1].getFirstToken();\r\n if (first.getRow() === second.getRow()\r\n && first.getEnd().getCol() === second.getStart().getCol()) {\r\n return second.getStart();\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.ParserMissingSpace = ParserMissingSpace;\r\n//# sourceMappingURL=parser_missing_space.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/parser_missing_space.js?");
12252
12274
 
12253
12275
  /***/ }),
12254
12276
 
@@ -12281,7 +12303,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12281
12303
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12282
12304
 
12283
12305
  "use strict";
12284
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferInline = exports.PreferInlineConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass PreferInlineConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferInlineConf = PreferInlineConf;\r\nclass PreferInline {\r\n constructor() {\r\n this.conf = new PreferInlineConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_inline\",\r\n title: \"Prefer Inline Declarations\",\r\n shortDescription: `Prefer inline to up-front declarations.`,\r\n extendedInformation: `EXPERIMENTAL\n\nActivates if language version is v740sp02 or above.\n\nVariables must be local(METHOD or FORM).\n\nNo generic or void typed variables.\n\nFirst position used must be a full/pure write.\n\nMove statment is not a cast(?=)\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],\r\n badExample: `DATA foo TYPE i.\nfoo = 2.\nDATA percentage TYPE decfloat34.\npercentage = ( comment_number / abs_statement_number ) * 100.`,\r\n goodExample: `DATA(foo) = 2.\nDATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n else if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n const scopes = this.findScopeCandidates(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n const ret = [];\r\n for (const s of scopes) {\r\n ret.push(...this.analyzeScope(s, obj));\r\n }\r\n return ret;\r\n }\r\n ///////////////////////////\r\n analyzeScope(node, obj) {\r\n var _a, _b;\r\n const ret = [];\r\n const vars = node.getData().vars;\r\n for (const name in vars) {\r\n const identifier = vars[name];\r\n if (this.isLocalDefinition(node, identifier) === false\r\n || identifier.getMeta().includes(\"inline\" /* InlineDefinition */)\r\n || identifier.getMeta().includes(\"form_parameter\" /* FormParameter */)) {\r\n continue;\r\n }\r\n else if (identifier.getType().isGeneric() === true) {\r\n continue;\r\n }\r\n else if (identifier.getType().containsVoid() === true) {\r\n continue;\r\n }\r\n const write = this.firstUseIsWrite(node, identifier);\r\n if (write === undefined) {\r\n continue;\r\n }\r\n // check that it is a pure write, eg not sub component assignment\r\n const next = this.findNextToken(write, obj);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n else if ((next === null || next === void 0 ? void 0 : next.getStart().equals(write.position.getEnd())) && next.getStr() !== \".\" && next.getStr() !== \",\") {\r\n continue;\r\n }\r\n const file = obj.getABAPFileByName(identifier.getFilename());\r\n const writeStatement = edit_helper_1.EditHelper.findStatement(next, file);\r\n const statementType = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.get();\r\n if (statementType === undefined) {\r\n continue;\r\n }\r\n // for now only allow some specific target statements, todo refactor\r\n if (!(statementType instanceof Statements.Move\r\n || statementType instanceof Statements.Catch\r\n || statementType instanceof Statements.ReadTable\r\n || statementType instanceof Statements.Loop)\r\n || ((_a = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.concatTokens()) === null || _a === void 0 ? void 0 : _a.includes(\"?=\"))\r\n || ((_b = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.concatTokens()) === null || _b === void 0 ? void 0 : _b.includes(\" #(\"))) {\r\n continue;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(identifier.getToken(), file);\r\n const concat = statement === null || statement === void 0 ? void 0 : statement.concatTokens().toUpperCase();\r\n if (concat === null || concat === void 0 ? void 0 : concat.includes(\"BEGIN OF\")) {\r\n continue;\r\n }\r\n let fix = undefined;\r\n if (file && statement) {\r\n const fix1 = edit_helper_1.EditHelper.deleteStatement(file, statement);\r\n const name = identifier.getName();\r\n const replace = name.startsWith(\"<\") ? \"FIELD-SYMBOL(\" + name + \")\" : \"DATA(\" + name + \")\";\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(file, write.position.getStart(), write.position.getEnd(), replace);\r\n fix = edit_helper_1.EditHelper.merge(fix1, fix2);\r\n }\r\n const message = this.getMetadata().title + \", \" + name;\r\n ret.push(issue_1.Issue.atIdentifier(identifier, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return ret;\r\n }\r\n ////////////////////////\r\n findNextToken(ref, obj) {\r\n const file = obj.getABAPFileByName(ref.resolved.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n for (const t of file.getTokens()) {\r\n if (t.getStart().isAfter(ref.position.getEnd())) {\r\n return t;\r\n }\r\n }\r\n return undefined;\r\n }\r\n firstUseIsWrite(node, identifier) {\r\n // assumption: variables are local, so only the current scope must be searched\r\n var _a, _b, _c;\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.TypeReference\r\n && ((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.getStart().equals(identifier.getStart())) === true) {\r\n return undefined;\r\n }\r\n }\r\n let firstRead = undefined;\r\n for (const r of node.getData().references) {\r\n if (r.referenceType !== _reference_1.ReferenceType.DataReadReference\r\n || ((_b = r.resolved) === null || _b === void 0 ? void 0 : _b.getStart().equals(identifier.getStart())) === false) {\r\n continue;\r\n }\r\n if (r.resolved) {\r\n firstRead = { position: r.position, resolved: r.resolved };\r\n break;\r\n }\r\n }\r\n let firstWrite = undefined;\r\n for (const w of node.getData().references) {\r\n if (w.referenceType !== _reference_1.ReferenceType.DataWriteReference\r\n || ((_c = w.resolved) === null || _c === void 0 ? void 0 : _c.getStart().equals(identifier.getStart())) === false) {\r\n continue;\r\n }\r\n if (w.resolved) {\r\n firstWrite = { position: w.position, resolved: w.resolved };\r\n break;\r\n }\r\n }\r\n if (firstRead === undefined) {\r\n return firstWrite;\r\n }\r\n else if (firstWrite === undefined) {\r\n return undefined;\r\n }\r\n else if (firstWrite.position.getStart().getRow() === firstRead.position.getStart().getRow()) {\r\n // if the same statement both reads and write the same variable\r\n // note that currently just the line number is compared, this is not correct, it should check if its the same statement\r\n return undefined;\r\n }\r\n else if (firstWrite.position.getStart().isBefore(firstRead.position.getStart())) {\r\n return firstWrite;\r\n }\r\n return undefined;\r\n }\r\n isLocalDefinition(node, identifier) {\r\n const { start, end } = node.calcCoverage();\r\n if (identifier.getStart().isAfter(start) && identifier.getStart().isBefore(end)) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n findScopeCandidates(node) {\r\n if (node.getIdentifier().stype === _scope_type_1.ScopeType.Form\r\n || node.getIdentifier().stype === _scope_type_1.ScopeType.Method) {\r\n return [node];\r\n }\r\n let ret = [];\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.findScopeCandidates(c));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.PreferInline = PreferInline;\r\n//# sourceMappingURL=prefer_inline.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_inline.js?");
12306
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferInline = exports.PreferInlineConf = void 0;\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass PreferInlineConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferInlineConf = PreferInlineConf;\r\nclass PreferInline {\r\n constructor() {\r\n this.conf = new PreferInlineConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_inline\",\r\n title: \"Prefer Inline Declarations\",\r\n shortDescription: `Prefer inline to up-front declarations.`,\r\n extendedInformation: `EXPERIMENTAL\r\n\r\nActivates if language version is v740sp02 or above.\r\n\r\nVariables must be local(METHOD or FORM).\r\n\r\nNo generic or void typed variables.\r\n\r\nFirst position used must be a full/pure write.\r\n\r\nMove statment is not a cast(?=)\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-inline-to-up-front-declarations`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Experimental, _irule_1.RuleTag.Quickfix],\r\n badExample: `DATA foo TYPE i.\r\nfoo = 2.\r\nDATA percentage TYPE decfloat34.\r\npercentage = ( comment_number / abs_statement_number ) * 100.`,\r\n goodExample: `DATA(foo) = 2.\r\nDATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 100.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n else if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n const scopes = this.findScopeCandidates(new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n const ret = [];\r\n for (const s of scopes) {\r\n ret.push(...this.analyzeScope(s, obj));\r\n }\r\n return ret;\r\n }\r\n ///////////////////////////\r\n analyzeScope(node, obj) {\r\n var _a, _b;\r\n const ret = [];\r\n const vars = node.getData().vars;\r\n for (const name in vars) {\r\n const identifier = vars[name];\r\n if (this.isLocalDefinition(node, identifier) === false\r\n || identifier.getMeta().includes(\"inline\" /* InlineDefinition */)\r\n || identifier.getMeta().includes(\"form_parameter\" /* FormParameter */)) {\r\n continue;\r\n }\r\n else if (identifier.getType().isGeneric() === true) {\r\n continue;\r\n }\r\n else if (identifier.getType().containsVoid() === true) {\r\n continue;\r\n }\r\n const write = this.firstUseIsWrite(node, identifier);\r\n if (write === undefined) {\r\n continue;\r\n }\r\n // check that it is a pure write, eg not sub component assignment\r\n const next = this.findNextToken(write, obj);\r\n if (next === undefined) {\r\n continue;\r\n }\r\n else if ((next === null || next === void 0 ? void 0 : next.getStart().equals(write.position.getEnd())) && next.getStr() !== \".\" && next.getStr() !== \",\") {\r\n continue;\r\n }\r\n const file = obj.getABAPFileByName(identifier.getFilename());\r\n const writeStatement = edit_helper_1.EditHelper.findStatement(next, file);\r\n const statementType = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.get();\r\n if (statementType === undefined) {\r\n continue;\r\n }\r\n // for now only allow some specific target statements, todo refactor\r\n if (!(statementType instanceof Statements.Move\r\n || statementType instanceof Statements.Catch\r\n || statementType instanceof Statements.ReadTable\r\n || statementType instanceof Statements.Loop)\r\n || ((_a = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.concatTokens()) === null || _a === void 0 ? void 0 : _a.includes(\"?=\"))\r\n || ((_b = writeStatement === null || writeStatement === void 0 ? void 0 : writeStatement.concatTokens()) === null || _b === void 0 ? void 0 : _b.includes(\" #(\"))) {\r\n continue;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(identifier.getToken(), file);\r\n const concat = statement === null || statement === void 0 ? void 0 : statement.concatTokens().toUpperCase();\r\n if (concat === null || concat === void 0 ? void 0 : concat.includes(\"BEGIN OF\")) {\r\n continue;\r\n }\r\n let fix = undefined;\r\n if (file && statement) {\r\n const fix1 = edit_helper_1.EditHelper.deleteStatement(file, statement);\r\n const name = identifier.getName();\r\n const replace = name.startsWith(\"<\") ? \"FIELD-SYMBOL(\" + name + \")\" : \"DATA(\" + name + \")\";\r\n const fix2 = edit_helper_1.EditHelper.replaceRange(file, write.position.getStart(), write.position.getEnd(), replace);\r\n fix = edit_helper_1.EditHelper.merge(fix1, fix2);\r\n }\r\n const message = this.getMetadata().title + \", \" + name;\r\n ret.push(issue_1.Issue.atIdentifier(identifier, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return ret;\r\n }\r\n ////////////////////////\r\n findNextToken(ref, obj) {\r\n const file = obj.getABAPFileByName(ref.resolved.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n for (const t of file.getTokens()) {\r\n if (t.getStart().isAfter(ref.position.getEnd())) {\r\n return t;\r\n }\r\n }\r\n return undefined;\r\n }\r\n firstUseIsWrite(node, identifier) {\r\n // assumption: variables are local, so only the current scope must be searched\r\n var _a, _b, _c;\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.TypeReference\r\n && ((_a = r.resolved) === null || _a === void 0 ? void 0 : _a.getStart().equals(identifier.getStart())) === true) {\r\n return undefined;\r\n }\r\n }\r\n let firstRead = undefined;\r\n for (const r of node.getData().references) {\r\n if (r.referenceType !== _reference_1.ReferenceType.DataReadReference\r\n || ((_b = r.resolved) === null || _b === void 0 ? void 0 : _b.getStart().equals(identifier.getStart())) === false) {\r\n continue;\r\n }\r\n if (r.resolved) {\r\n firstRead = { position: r.position, resolved: r.resolved };\r\n break;\r\n }\r\n }\r\n let firstWrite = undefined;\r\n for (const w of node.getData().references) {\r\n if (w.referenceType !== _reference_1.ReferenceType.DataWriteReference\r\n || ((_c = w.resolved) === null || _c === void 0 ? void 0 : _c.getStart().equals(identifier.getStart())) === false) {\r\n continue;\r\n }\r\n if (w.resolved) {\r\n firstWrite = { position: w.position, resolved: w.resolved };\r\n break;\r\n }\r\n }\r\n if (firstRead === undefined) {\r\n return firstWrite;\r\n }\r\n else if (firstWrite === undefined) {\r\n return undefined;\r\n }\r\n else if (firstWrite.position.getStart().getRow() === firstRead.position.getStart().getRow()) {\r\n // if the same statement both reads and write the same variable\r\n // note that currently just the line number is compared, this is not correct, it should check if its the same statement\r\n return undefined;\r\n }\r\n else if (firstWrite.position.getStart().isBefore(firstRead.position.getStart())) {\r\n return firstWrite;\r\n }\r\n return undefined;\r\n }\r\n isLocalDefinition(node, identifier) {\r\n const { start, end } = node.calcCoverage();\r\n if (identifier.getStart().isAfter(start) && identifier.getStart().isBefore(end)) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n findScopeCandidates(node) {\r\n if (node.getIdentifier().stype === _scope_type_1.ScopeType.Form\r\n || node.getIdentifier().stype === _scope_type_1.ScopeType.Method) {\r\n return [node];\r\n }\r\n let ret = [];\r\n for (const c of node.getChildren()) {\r\n ret = ret.concat(this.findScopeCandidates(c));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.PreferInline = PreferInline;\r\n//# sourceMappingURL=prefer_inline.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_inline.js?");
12285
12307
 
12286
12308
  /***/ }),
12287
12309
 
@@ -12292,7 +12314,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12292
12314
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12293
12315
 
12294
12316
  "use strict";
12295
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferIsNot = exports.PreferIsNotConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass PreferIsNotConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferIsNotConf = PreferIsNotConf;\r\nclass PreferIsNot extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferIsNotConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_is_not\",\r\n title: \"Prefer IS NOT to NOT IS\",\r\n shortDescription: `Prefer IS NOT to NOT IS`,\r\n extendedInformation: `\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is\n\n\"if not is_valid( ).\" examples are skipped`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n goodExample: `IF variable IS NOT INITIAL.\nIF variable NP 'TODO*'.\nIF variable <> 42.`,\r\n badExample: `IF NOT variable IS INITIAL.\nIF NOT variable CP 'TODO*'.\nIF NOT variable = 42.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n for (const c of s.findAllExpressions(Expressions.Compare)) {\r\n if (c.concatTokens().toUpperCase().startsWith(\"NOT \") === false) {\r\n continue;\r\n }\r\n else if (c.getChildren().length === 2 && c.getChildren()[1].get() instanceof Expressions.MethodCallChain) {\r\n continue;\r\n }\r\n const message = \"Prefer IS NOT to NOT IS\";\r\n const fix = this.getFix(file, c);\r\n issues.push(issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, c) {\r\n let insertFix;\r\n if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"IS\") {\r\n const tokenPositionBeforeDelete = c.getChildren()[2].getLastToken().getEnd();\r\n const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);\r\n insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, \"NOT \");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"IN\" || c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"BETWEEN\") {\r\n const tokenPositionBeforeDelete = c.getChildren()[1].getLastToken().getEnd();\r\n const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);\r\n insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, \"NOT \");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<>\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<>\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"=\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \">\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \">\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \">=\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \">=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<=\");\r\n }\r\n else {\r\n return;\r\n }\r\n const endCol = c.getChildren()[0].getFirstToken().getEnd().getCol() + 1;\r\n const endPosition = new position_1.Position(c.getChildren()[0].getFirstToken().getEnd().getRow(), endCol);\r\n const deleteFix = edit_helper_1.EditHelper.deleteRange(file, c.getChildren()[0].getFirstToken().getStart(), endPosition);\r\n const finalFix = edit_helper_1.EditHelper.merge(insertFix, deleteFix);\r\n return finalFix;\r\n }\r\n}\r\nexports.PreferIsNot = PreferIsNot;\r\n//# sourceMappingURL=prefer_is_not.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js?");
12317
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferIsNot = exports.PreferIsNotConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass PreferIsNotConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferIsNotConf = PreferIsNotConf;\r\nclass PreferIsNot extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferIsNotConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_is_not\",\r\n title: \"Prefer IS NOT to NOT IS\",\r\n shortDescription: `Prefer IS NOT to NOT IS`,\r\n extendedInformation: `\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-is-not-to-not-is\r\n\r\n\"if not is_valid( ).\" examples are skipped`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n goodExample: `IF variable IS NOT INITIAL.\r\nIF variable NP 'TODO*'.\r\nIF variable <> 42.`,\r\n badExample: `IF NOT variable IS INITIAL.\r\nIF NOT variable CP 'TODO*'.\r\nIF NOT variable = 42.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n for (const c of s.findAllExpressions(Expressions.Compare)) {\r\n if (c.concatTokens().toUpperCase().startsWith(\"NOT \") === false) {\r\n continue;\r\n }\r\n else if (c.getChildren().length === 2 && c.getChildren()[1].get() instanceof Expressions.MethodCallChain) {\r\n continue;\r\n }\r\n const message = \"Prefer IS NOT to NOT IS\";\r\n const fix = this.getFix(file, c);\r\n issues.push(issue_1.Issue.atToken(file, c.getFirstToken(), message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, c) {\r\n let insertFix;\r\n if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"IS\") {\r\n const tokenPositionBeforeDelete = c.getChildren()[2].getLastToken().getEnd();\r\n const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);\r\n insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, \"NOT \");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"IN\" || c.getChildren()[2].getFirstToken().getStr().toUpperCase() === \"BETWEEN\") {\r\n const tokenPositionBeforeDelete = c.getChildren()[1].getLastToken().getEnd();\r\n const tokenPosition = new position_1.Position(tokenPositionBeforeDelete.getRow(), tokenPositionBeforeDelete.getCol() + 1);\r\n insertFix = edit_helper_1.EditHelper.insertAt(file, tokenPosition, \"NOT \");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<>\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<>\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"=\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \">\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \">\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \"<=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \">=\");\r\n }\r\n else if (c.getChildren()[2].getFirstToken().getStr() === \">=\") {\r\n insertFix = edit_helper_1.EditHelper.replaceToken(file, c.getChildren()[2].getLastToken(), \"<=\");\r\n }\r\n else {\r\n return;\r\n }\r\n const endCol = c.getChildren()[0].getFirstToken().getEnd().getCol() + 1;\r\n const endPosition = new position_1.Position(c.getChildren()[0].getFirstToken().getEnd().getRow(), endCol);\r\n const deleteFix = edit_helper_1.EditHelper.deleteRange(file, c.getChildren()[0].getFirstToken().getStart(), endPosition);\r\n const finalFix = edit_helper_1.EditHelper.merge(insertFix, deleteFix);\r\n return finalFix;\r\n }\r\n}\r\nexports.PreferIsNot = PreferIsNot;\r\n//# sourceMappingURL=prefer_is_not.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_is_not.js?");
12296
12318
 
12297
12319
  /***/ }),
12298
12320
 
@@ -12303,7 +12325,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12303
12325
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12304
12326
 
12305
12327
  "use strict";
12306
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferRaiseExceptionNew = exports.PreferRaiseExceptionNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass PreferRaiseExceptionNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferRaiseExceptionNewConf = PreferRaiseExceptionNewConf;\r\nclass PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferRaiseExceptionNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_raise_exception_new\",\r\n title: \"Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE\",\r\n shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,\r\n extendedInformation: `\n https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,\r\n badExample: `RAISE EXCEPTION TYPE cx_generation_error\n EXPORTING\n previous = exception.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n if (this.reg.getConfig().getVersion() < __1.Version.v752) {\r\n return [];\r\n }\r\n const issues = [];\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof __1.Statements.Raise) {\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.includes(\" MESSAGE\")) {\r\n continue;\r\n }\r\n if (concat.startsWith(\"RAISE EXCEPTION TYPE \")) {\r\n const message = \"Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE\";\r\n const fix = this.getFix(file, statement, concat.includes(\" EXPORTING\") ? true : false);\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, withExporting) {\r\n const children = statement.getChildren();\r\n let contentFix = undefined;\r\n if (withExporting) {\r\n const fixText = \"( \" + children[5].concatTokens() + \" ).\";\r\n contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), fixText);\r\n }\r\n else {\r\n contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), \"( ).\");\r\n }\r\n const replaceType = edit_helper_1.EditHelper.replaceToken(file, children[2].getFirstToken(), \"NEW\");\r\n return edit_helper_1.EditHelper.merge(contentFix, replaceType);\r\n }\r\n}\r\nexports.PreferRaiseExceptionNew = PreferRaiseExceptionNew;\r\n//# sourceMappingURL=prefer_raise_exception_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js?");
12328
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferRaiseExceptionNew = exports.PreferRaiseExceptionNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nclass PreferRaiseExceptionNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferRaiseExceptionNewConf = PreferRaiseExceptionNewConf;\r\nclass PreferRaiseExceptionNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferRaiseExceptionNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_raise_exception_new\",\r\n title: \"Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE\",\r\n shortDescription: `Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE`,\r\n extendedInformation: `\r\n https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-raise-exception-new-to-raise-exception-type`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Quickfix],\r\n goodExample: `RAISE EXCEPTION NEW cx_generation_error( previous = exception ).`,\r\n badExample: `RAISE EXCEPTION TYPE cx_generation_error\r\n EXPORTING\r\n previous = exception.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n if (this.reg.getConfig().getVersion() < __1.Version.v752) {\r\n return [];\r\n }\r\n const issues = [];\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof __1.Statements.Raise) {\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.includes(\" MESSAGE\")) {\r\n continue;\r\n }\r\n if (concat.startsWith(\"RAISE EXCEPTION TYPE \")) {\r\n const message = \"Prefer RAISE EXCEPTION NEW to RAISE EXCEPTION TYPE\";\r\n const fix = this.getFix(file, statement, concat.includes(\" EXPORTING\") ? true : false);\r\n issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getFix(file, statement, withExporting) {\r\n const children = statement.getChildren();\r\n let contentFix = undefined;\r\n if (withExporting) {\r\n const fixText = \"( \" + children[5].concatTokens() + \" ).\";\r\n contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), fixText);\r\n }\r\n else {\r\n contentFix = edit_helper_1.EditHelper.replaceRange(file, children[3].getLastToken().getEnd(), statement.getEnd(), \"( ).\");\r\n }\r\n const replaceType = edit_helper_1.EditHelper.replaceToken(file, children[2].getFirstToken(), \"NEW\");\r\n return edit_helper_1.EditHelper.merge(contentFix, replaceType);\r\n }\r\n}\r\nexports.PreferRaiseExceptionNew = PreferRaiseExceptionNew;\r\n//# sourceMappingURL=prefer_raise_exception_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_raise_exception_new.js?");
12307
12329
 
12308
12330
  /***/ }),
12309
12331
 
@@ -12314,7 +12336,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12314
12336
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12315
12337
 
12316
12338
  "use strict";
12317
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferReturningToExporting = exports.PreferReturningToExportingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass PreferReturningToExportingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferReturningToExportingConf = PreferReturningToExportingConf;\r\nclass PreferReturningToExporting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferReturningToExportingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_returning_to_exporting\",\r\n title: \"Prefer RETURNING to EXPORTING\",\r\n shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting\nhttps://docs.abapopenchecks.org/checks/44/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const ret = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const def of stru.findAllStatements(Statements.MethodDef)) {\r\n if (def.findFirstExpression(Expressions.MethodDefChanging)) {\r\n continue;\r\n }\r\n const exporting = def.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting === undefined) {\r\n continue;\r\n }\r\n const returning = def.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning !== undefined) {\r\n continue;\r\n }\r\n const params = exporting.findDirectExpressions(Expressions.MethodParam);\r\n if (params.length !== 1) {\r\n continue;\r\n }\r\n const concat = params[0].concatTokens().toUpperCase();\r\n if (concat.endsWith(\"TYPE ANY\")\r\n || concat.endsWith(\"TYPE ANY TABLE\")\r\n || concat.endsWith(\"TYPE C\")\r\n || concat.endsWith(\"TYPE CLIKE\")\r\n || concat.endsWith(\"TYPE CSEQUENCE\")\r\n || concat.endsWith(\"TYPE DATA\")\r\n || concat.endsWith(\"TYPE DECFLOAT\")\r\n || concat.endsWith(\"TYPE HASHED TABLE\")\r\n || concat.endsWith(\"TYPE INDEX TABLE\")\r\n || concat.endsWith(\"TYPE N\")\r\n || concat.endsWith(\"TYPE NUMERIC\")\r\n || concat.endsWith(\"TYPE OBJECT\")\r\n || concat.endsWith(\"TYPE P\")\r\n || concat.endsWith(\"TYPE SIMPLE\")\r\n || concat.endsWith(\"TYPE SORTED TABLE\")\r\n || concat.endsWith(\"TYPE STANDARD TABLE\")\r\n || concat.endsWith(\"TYPE TABLE\")\r\n || concat.endsWith(\"TYPE X\")\r\n || concat.endsWith(\"TYPE XSEQUENCE\")) {\r\n continue;\r\n }\r\n const token = params[0].getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, \"Prefer RETURNING to EXPORTING\", this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.PreferReturningToExporting = PreferReturningToExporting;\r\n//# sourceMappingURL=prefer_returning_to_exporting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js?");
12339
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferReturningToExporting = exports.PreferReturningToExportingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass PreferReturningToExportingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferReturningToExportingConf = PreferReturningToExportingConf;\r\nclass PreferReturningToExporting extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferReturningToExportingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_returning_to_exporting\",\r\n title: \"Prefer RETURNING to EXPORTING\",\r\n shortDescription: `Prefer RETURNING to EXPORTING. Generic types cannot be RETURNING.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-returning-to-exporting\r\nhttps://docs.abapopenchecks.org/checks/44/`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const ret = [];\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return [];\r\n }\r\n for (const def of stru.findAllStatements(Statements.MethodDef)) {\r\n if (def.findFirstExpression(Expressions.MethodDefChanging)) {\r\n continue;\r\n }\r\n const exporting = def.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting === undefined) {\r\n continue;\r\n }\r\n const returning = def.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning !== undefined) {\r\n continue;\r\n }\r\n const params = exporting.findDirectExpressions(Expressions.MethodParam);\r\n if (params.length !== 1) {\r\n continue;\r\n }\r\n const concat = params[0].concatTokens().toUpperCase();\r\n if (concat.endsWith(\"TYPE ANY\")\r\n || concat.endsWith(\"TYPE ANY TABLE\")\r\n || concat.endsWith(\"TYPE C\")\r\n || concat.endsWith(\"TYPE CLIKE\")\r\n || concat.endsWith(\"TYPE CSEQUENCE\")\r\n || concat.endsWith(\"TYPE DATA\")\r\n || concat.endsWith(\"TYPE DECFLOAT\")\r\n || concat.endsWith(\"TYPE HASHED TABLE\")\r\n || concat.endsWith(\"TYPE INDEX TABLE\")\r\n || concat.endsWith(\"TYPE N\")\r\n || concat.endsWith(\"TYPE NUMERIC\")\r\n || concat.endsWith(\"TYPE OBJECT\")\r\n || concat.endsWith(\"TYPE P\")\r\n || concat.endsWith(\"TYPE SIMPLE\")\r\n || concat.endsWith(\"TYPE SORTED TABLE\")\r\n || concat.endsWith(\"TYPE STANDARD TABLE\")\r\n || concat.endsWith(\"TYPE TABLE\")\r\n || concat.endsWith(\"TYPE X\")\r\n || concat.endsWith(\"TYPE XSEQUENCE\")) {\r\n continue;\r\n }\r\n const token = params[0].getFirstToken();\r\n const issue = issue_1.Issue.atToken(file, token, \"Prefer RETURNING to EXPORTING\", this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.PreferReturningToExporting = PreferReturningToExporting;\r\n//# sourceMappingURL=prefer_returning_to_exporting.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_returning_to_exporting.js?");
12318
12340
 
12319
12341
  /***/ }),
12320
12342
 
@@ -12325,7 +12347,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12325
12347
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12326
12348
 
12327
12349
  "use strict";
12328
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferXsdbool = exports.PreferXsdboolConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass PreferXsdboolConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferXsdboolConf = PreferXsdboolConf;\r\nclass PreferXsdbool extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferXsdboolConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_xsdbool\",\r\n title: \"Prefer xsdbool over boolc\",\r\n shortDescription: `Prefer xsdbool over boolc`,\r\n extendedInformation: `Activates if language version is v740sp08 or above.\n\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `DATA(sdf) = boolc( 1 = 2 ).`,\r\n goodExample: `DATA(sdf) = xsdbool( 1 = 2 ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp08 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const s of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Source)) || []) {\r\n if (s.concatTokens().toUpperCase().startsWith(\"BOOLC( \") === false) {\r\n continue;\r\n }\r\n const token = s.getFirstToken();\r\n const message = \"Prefer xsdbool over boolc\";\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"xsdbool\");\r\n issues.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.PreferXsdbool = PreferXsdbool;\r\n//# sourceMappingURL=prefer_xsdbool.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js?");
12350
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PreferXsdbool = exports.PreferXsdboolConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass PreferXsdboolConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PreferXsdboolConf = PreferXsdboolConf;\r\nclass PreferXsdbool extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PreferXsdboolConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"prefer_xsdbool\",\r\n title: \"Prefer xsdbool over boolc\",\r\n shortDescription: `Prefer xsdbool over boolc`,\r\n extendedInformation: `Activates if language version is v740sp08 or above.\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,\r\n tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Upport, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `DATA(sdf) = boolc( 1 = 2 ).`,\r\n goodExample: `DATA(sdf) = xsdbool( 1 = 2 ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a;\r\n const issues = [];\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp08 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const s of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Source)) || []) {\r\n if (s.concatTokens().toUpperCase().startsWith(\"BOOLC( \") === false) {\r\n continue;\r\n }\r\n const token = s.getFirstToken();\r\n const message = \"Prefer xsdbool over boolc\";\r\n const fix = edit_helper_1.EditHelper.replaceToken(file, token, \"xsdbool\");\r\n issues.push(issue_1.Issue.atToken(file, token, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.PreferXsdbool = PreferXsdbool;\r\n//# sourceMappingURL=prefer_xsdbool.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/prefer_xsdbool.js?");
12329
12351
 
12330
12352
  /***/ }),
12331
12353
 
@@ -12380,7 +12402,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12380
12402
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12381
12403
 
12382
12404
  "use strict";
12383
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RemoveDescriptions = exports.RemoveDescriptionsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst fast_xml_parser_1 = __webpack_require__(/*! fast-xml-parser */ \"./node_modules/fast-xml-parser/src/fxp.js\");\r\nconst Objects = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\r\nclass RemoveDescriptionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore global exception classes */\r\n this.ignoreExceptions = false;\r\n /** Ignore global workflow classes */\r\n this.ignoreWorkflow = true;\r\n }\r\n}\r\nexports.RemoveDescriptionsConf = RemoveDescriptionsConf;\r\nclass RemoveDescriptions {\r\n constructor() {\r\n this.conf = new RemoveDescriptionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"remove_descriptions\",\r\n title: \"Remove descriptions\",\r\n shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.\n\nClass descriptions are required, see rule description_empty.\n\nConsider using ABAP Doc for documentation.`,\r\n tags: [],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n // plan is omitting knowledge about descriptions in abaplint, so this rule must parse the XML\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof Objects.Class) {\r\n let def;\r\n try {\r\n def = obj.getClassDefinition();\r\n }\r\n catch (_a) {\r\n return [];\r\n }\r\n if (def === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(def, obj)) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreWorkflow === true && def.interfaces.find(e => e.name.toUpperCase() === \"IF_WORKFLOW\")) {\r\n return [];\r\n }\r\n return this.checkClass(obj);\r\n }\r\n else if (obj instanceof Objects.Interface) {\r\n return this.checkInterface(obj);\r\n }\r\n return [];\r\n }\r\n //////////////\r\n checkInterface(obj) {\r\n const xml = obj.getXML();\r\n if (xml === undefined) {\r\n return [];\r\n }\r\n const file = obj.getXMLFile();\r\n if (file === undefined) {\r\n return [];\r\n }\r\n return this.checkXML(xml, file);\r\n }\r\n checkClass(obj) {\r\n const xml = obj.getXML();\r\n if (xml === undefined) {\r\n return [];\r\n }\r\n const file = obj.getXMLFile();\r\n if (file === undefined) {\r\n return [];\r\n }\r\n return this.checkXML(xml, file);\r\n }\r\n checkXML(xml, file) {\r\n const parsed = new fast_xml_parser_1.XMLParser({ parseTagValue: false, ignoreAttributes: true, trimValues: false }).parse(xml);\r\n if (parsed === undefined || parsed.abapGit[\"asx:abap\"][\"asx:values\"] === undefined) {\r\n return [];\r\n }\r\n const desc = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DESCRIPTIONS;\r\n if (desc === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of (0, xml_utils_1.xmlToArray)(desc.SEOCOMPOTX)) {\r\n const message = \"Remove description for \" + d.CMPNAME;\r\n const position = new position_1.Position(1, 1);\r\n const issue = issue_1.Issue.atPosition(file, position, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.RemoveDescriptions = RemoveDescriptions;\r\n//# sourceMappingURL=remove_descriptions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js?");
12405
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RemoveDescriptions = exports.RemoveDescriptionsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst fast_xml_parser_1 = __webpack_require__(/*! fast-xml-parser */ \"./node_modules/fast-xml-parser/src/fxp.js\");\r\nconst Objects = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\r\nclass RemoveDescriptionsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Ignore global exception classes */\r\n this.ignoreExceptions = false;\r\n /** Ignore global workflow classes */\r\n this.ignoreWorkflow = true;\r\n }\r\n}\r\nexports.RemoveDescriptionsConf = RemoveDescriptionsConf;\r\nclass RemoveDescriptions {\r\n constructor() {\r\n this.conf = new RemoveDescriptionsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"remove_descriptions\",\r\n title: \"Remove descriptions\",\r\n shortDescription: `Ensures you have no descriptions in metadata of methods, parameters, etc.\r\n\r\nClass descriptions are required, see rule description_empty.\r\n\r\nConsider using ABAP Doc for documentation.`,\r\n tags: [],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n // plan is omitting knowledge about descriptions in abaplint, so this rule must parse the XML\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (obj instanceof Objects.Class) {\r\n let def;\r\n try {\r\n def = obj.getClassDefinition();\r\n }\r\n catch (_a) {\r\n return [];\r\n }\r\n if (def === undefined) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreExceptions && ddic.isException(def, obj)) {\r\n return [];\r\n }\r\n else if (this.conf.ignoreWorkflow === true && def.interfaces.find(e => e.name.toUpperCase() === \"IF_WORKFLOW\")) {\r\n return [];\r\n }\r\n return this.checkClass(obj);\r\n }\r\n else if (obj instanceof Objects.Interface) {\r\n return this.checkInterface(obj);\r\n }\r\n return [];\r\n }\r\n //////////////\r\n checkInterface(obj) {\r\n const xml = obj.getXML();\r\n if (xml === undefined) {\r\n return [];\r\n }\r\n const file = obj.getXMLFile();\r\n if (file === undefined) {\r\n return [];\r\n }\r\n return this.checkXML(xml, file);\r\n }\r\n checkClass(obj) {\r\n const xml = obj.getXML();\r\n if (xml === undefined) {\r\n return [];\r\n }\r\n const file = obj.getXMLFile();\r\n if (file === undefined) {\r\n return [];\r\n }\r\n return this.checkXML(xml, file);\r\n }\r\n checkXML(xml, file) {\r\n const parsed = new fast_xml_parser_1.XMLParser({ parseTagValue: false, ignoreAttributes: true, trimValues: false }).parse(xml);\r\n if (parsed === undefined || parsed.abapGit[\"asx:abap\"][\"asx:values\"] === undefined) {\r\n return [];\r\n }\r\n const desc = parsed.abapGit[\"asx:abap\"][\"asx:values\"].DESCRIPTIONS;\r\n if (desc === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of (0, xml_utils_1.xmlToArray)(desc.SEOCOMPOTX)) {\r\n const message = \"Remove description for \" + d.CMPNAME;\r\n const position = new position_1.Position(1, 1);\r\n const issue = issue_1.Issue.atPosition(file, position, message, this.getMetadata().key, this.conf.severity);\r\n ret.push(issue);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.RemoveDescriptions = RemoveDescriptions;\r\n//# sourceMappingURL=remove_descriptions.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/remove_descriptions.js?");
12384
12406
 
12385
12407
  /***/ }),
12386
12408
 
@@ -12391,7 +12413,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12391
12413
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12392
12414
 
12393
12415
  "use strict";
12394
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RFCErrorHandling = exports.RFCErrorHandlingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass RFCErrorHandlingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.RFCErrorHandlingConf = RFCErrorHandlingConf;\r\nclass RFCErrorHandling extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new RFCErrorHandlingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"rfc_error_handling\",\r\n title: \"RFC error handling\",\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,\r\n badExample: `\nCALL FUNCTION 'ZRFC'\n DESTINATION lv_rfc.`,\r\n goodExample: `\nCALL FUNCTION 'ZRFC'\n DESTINATION lv_rfc\n EXCEPTIONS\n system_failure = 1 MESSAGE msg\n communication_failure = 2 MESSAGE msg\n resource_failure = 3\n OTHERS = 4.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"RFC error handling: At least one unhandled exception from SYSTEM_FAILURE, COMMUNICATION_FAILURE, RESOURCE_FAILURE.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const output = [];\r\n for (const stat of file.getStatements()) {\r\n const token = stat.getFirstToken();\r\n if (!(stat.get() instanceof Statements.CallFunction)) {\r\n continue;\r\n }\r\n if (!stat.findFirstExpression(Expressions.Destination)) {\r\n continue;\r\n }\r\n const list = stat.findFirstExpression(Expressions.ParameterListExceptions);\r\n if (list === undefined) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n continue;\r\n }\r\n const parameters = list.findAllExpressions(Expressions.ParameterName);\r\n const names = [];\r\n for (const par of parameters) {\r\n names.push(par.getFirstToken().getStr().toUpperCase());\r\n }\r\n if (names.indexOf(\"SYSTEM_FAILURE\") < 0\r\n || names.indexOf(\"COMMUNICATION_FAILURE\") < 0\r\n || names.indexOf(\"RESOURCE_FAILURE\") < 0) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n continue;\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.RFCErrorHandling = RFCErrorHandling;\r\n//# sourceMappingURL=rfc_error_handling.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js?");
12416
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.RFCErrorHandling = exports.RFCErrorHandlingConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass RFCErrorHandlingConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.RFCErrorHandlingConf = RFCErrorHandlingConf;\r\nclass RFCErrorHandling extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new RFCErrorHandlingConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"rfc_error_handling\",\r\n title: \"RFC error handling\",\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n shortDescription: `Checks that exceptions 'system_failure' and 'communication_failure' are handled in RFC calls`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abenrfc_exception.htm`,\r\n badExample: `\r\nCALL FUNCTION 'ZRFC'\r\n DESTINATION lv_rfc.`,\r\n goodExample: `\r\nCALL FUNCTION 'ZRFC'\r\n DESTINATION lv_rfc\r\n EXCEPTIONS\r\n system_failure = 1 MESSAGE msg\r\n communication_failure = 2 MESSAGE msg\r\n resource_failure = 3\r\n OTHERS = 4.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"RFC error handling: At least one unhandled exception from SYSTEM_FAILURE, COMMUNICATION_FAILURE, RESOURCE_FAILURE.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const output = [];\r\n for (const stat of file.getStatements()) {\r\n const token = stat.getFirstToken();\r\n if (!(stat.get() instanceof Statements.CallFunction)) {\r\n continue;\r\n }\r\n if (!stat.findFirstExpression(Expressions.Destination)) {\r\n continue;\r\n }\r\n const list = stat.findFirstExpression(Expressions.ParameterListExceptions);\r\n if (list === undefined) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n continue;\r\n }\r\n const parameters = list.findAllExpressions(Expressions.ParameterName);\r\n const names = [];\r\n for (const par of parameters) {\r\n names.push(par.getFirstToken().getStr().toUpperCase());\r\n }\r\n if (names.indexOf(\"SYSTEM_FAILURE\") < 0\r\n || names.indexOf(\"COMMUNICATION_FAILURE\") < 0\r\n || names.indexOf(\"RESOURCE_FAILURE\") < 0) {\r\n const issue = issue_1.Issue.atToken(file, token, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n output.push(issue);\r\n continue;\r\n }\r\n }\r\n return output;\r\n }\r\n}\r\nexports.RFCErrorHandling = RFCErrorHandling;\r\n//# sourceMappingURL=rfc_error_handling.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/rfc_error_handling.js?");
12395
12417
 
12396
12418
  /***/ }),
12397
12419
 
@@ -12402,7 +12424,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12402
12424
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12403
12425
 
12404
12426
  "use strict";
12405
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectAddOrderBy = exports.SelectAddOrderByConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SelectAddOrderByConf = SelectAddOrderByConf;\r\nclass SelectAddOrderBy {\r\n constructor() {\r\n this.conf = new SelectAddOrderByConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_add_order_by\",\r\n title: \"SELECT add ORDER BY\",\r\n shortDescription: `SELECTs add ORDER BY clause`,\r\n extendedInformation: `\nThis will make sure that the SELECT statement returns results in the same sequence on different databases\n\nadd ORDER BY PRIMARY KEY if in doubt\n\nIf the target is a sorted/hashed table, no issue is reported`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const c = s.concatTokens();\r\n if (c.startsWith(\"SELECT SINGLE \")) {\r\n continue;\r\n }\r\n // skip COUNT(*)\r\n const list = s.findFirstExpression(Expressions.SQLFieldList);\r\n if ((list === null || list === void 0 ? void 0 : list.getChildren().length) === 1 && ((_a = list.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SQLAggregation) {\r\n continue;\r\n }\r\n else if (s.findFirstExpression(Expressions.SQLOrderBy)) {\r\n continue;\r\n }\r\n if (this.isTargetSortedOrHashed(s, spaghetti, file)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, s, \"Add ORDER BY\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n isTargetSortedOrHashed(s, spaghetti, file) {\r\n var _a, _b;\r\n const target = (_a = s.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.Target);\r\n if (target) {\r\n const start = target.getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n let type = (_b = scope === null || scope === void 0 ? void 0 : scope.findWriteReference(start)) === null || _b === void 0 ? void 0 : _b.getType();\r\n const children = target.getChildren();\r\n if (type instanceof basic_1.StructureType && children.length >= 3 && children[1].concatTokens() === \"-\") {\r\n const found = type.getComponentByName(children[2].concatTokens());\r\n if (found === undefined) {\r\n return false;\r\n }\r\n type = found;\r\n }\r\n if (type instanceof basic_1.TableType\r\n && ((type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.sorted || (type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.hashed)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.SelectAddOrderBy = SelectAddOrderBy;\r\n//# sourceMappingURL=select_add_order_by.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js?");
12427
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectAddOrderBy = exports.SelectAddOrderByConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SelectAddOrderByConf = SelectAddOrderByConf;\r\nclass SelectAddOrderBy {\r\n constructor() {\r\n this.conf = new SelectAddOrderByConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_add_order_by\",\r\n title: \"SELECT add ORDER BY\",\r\n shortDescription: `SELECTs add ORDER BY clause`,\r\n extendedInformation: `\r\nThis will make sure that the SELECT statement returns results in the same sequence on different databases\r\n\r\nadd ORDER BY PRIMARY KEY if in doubt\r\n\r\nIf the target is a sorted/hashed table, no issue is reported`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n var _a;\r\n const issues = [];\r\n if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const c = s.concatTokens();\r\n if (c.startsWith(\"SELECT SINGLE \")) {\r\n continue;\r\n }\r\n // skip COUNT(*)\r\n const list = s.findFirstExpression(Expressions.SQLFieldList);\r\n if ((list === null || list === void 0 ? void 0 : list.getChildren().length) === 1 && ((_a = list.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.SQLAggregation) {\r\n continue;\r\n }\r\n else if (s.findFirstExpression(Expressions.SQLOrderBy)) {\r\n continue;\r\n }\r\n if (this.isTargetSortedOrHashed(s, spaghetti, file)) {\r\n continue;\r\n }\r\n issues.push(issue_1.Issue.atStatement(file, s, \"Add ORDER BY\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n isTargetSortedOrHashed(s, spaghetti, file) {\r\n var _a, _b;\r\n const target = (_a = s.findFirstExpression(Expressions.SQLIntoTable)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.Target);\r\n if (target) {\r\n const start = target.getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n let type = (_b = scope === null || scope === void 0 ? void 0 : scope.findWriteReference(start)) === null || _b === void 0 ? void 0 : _b.getType();\r\n const children = target.getChildren();\r\n if (type instanceof basic_1.StructureType && children.length >= 3 && children[1].concatTokens() === \"-\") {\r\n const found = type.getComponentByName(children[2].concatTokens());\r\n if (found === undefined) {\r\n return false;\r\n }\r\n type = found;\r\n }\r\n if (type instanceof basic_1.TableType\r\n && ((type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.sorted || (type === null || type === void 0 ? void 0 : type.getAccessType()) === basic_1.TableAccessType.hashed)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.SelectAddOrderBy = SelectAddOrderBy;\r\n//# sourceMappingURL=select_add_order_by.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_add_order_by.js?");
12406
12428
 
12407
12429
  /***/ }),
12408
12430
 
@@ -12413,7 +12435,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12413
12435
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12414
12436
 
12415
12437
  "use strict";
12416
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectPerformance = exports.SelectPerformanceConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst structure_type_1 = __webpack_require__(/*! ../abap/types/basic/structure_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js\");\r\nconst DEFAULT_COLUMNS = 10;\r\nclass SelectPerformanceConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects ENDSELECT */\r\n this.endSelect = true;\r\n /** Detects SELECT * */\r\n this.selectStar = true;\r\n /** \"SELECT\" * is considered okay if the table is less than X columns, the table must be known to the linter */\r\n this.starOkayIfFewColumns = DEFAULT_COLUMNS;\r\n }\r\n}\r\nexports.SelectPerformanceConf = SelectPerformanceConf;\r\nclass SelectPerformance {\r\n constructor() {\r\n this.conf = new SelectPerformanceConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_performance\",\r\n title: \"SELECT performance\",\r\n shortDescription: `Various checks regarding SELECT performance.`,\r\n extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE\n\nSELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],\r\n };\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n getConfig() {\r\n if (this.conf.starOkayIfFewColumns === undefined) {\r\n this.conf.starOkayIfFewColumns = DEFAULT_COLUMNS;\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n const issues = [];\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n if (this.conf.endSelect) {\r\n for (const s of stru.findAllStructures(Structures.Select) || []) {\r\n const select = s.findDirectStatement(Statements.SelectLoop);\r\n if (select === undefined || select.concatTokens().toUpperCase().includes(\"PACKAGE SIZE\")) {\r\n continue;\r\n }\r\n const message = \"Avoid use of ENDSELECT\";\r\n issues.push(issue_1.Issue.atStatement(file, select, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n if (this.conf.selectStar) {\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const concat = s.concatTokens().toUpperCase();\r\n if (concat.startsWith(\"SELECT * \") === false\r\n && concat.startsWith(\"SELECT SINGLE * \") === false) {\r\n continue;\r\n }\r\n else if (concat.includes(\" INTO CORRESPONDING FIELDS OF \")\r\n || concat.includes(\" APPENDING CORRESPONDING FIELDS OF \")) {\r\n continue;\r\n }\r\n const columnCount = this.findNumberOfColumns(s, file, spaghetti);\r\n if (columnCount\r\n && columnCount <= this.getConfig().starOkayIfFewColumns) {\r\n continue;\r\n }\r\n const message = \"Avoid use of SELECT *\";\r\n issues.push(issue_1.Issue.atToken(file, s.getFirstToken(), message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n findNumberOfColumns(s, file, spaghetti) {\r\n const dbnames = s.findAllExpressions(Expressions.DatabaseTable);\r\n if (dbnames.length === 1) {\r\n const start = dbnames[0].getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n const name = scope === null || scope === void 0 ? void 0 : scope.findTableReference(start);\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n const parsed = tabl === null || tabl === void 0 ? void 0 : tabl.parseType(this.reg);\r\n if (parsed instanceof structure_type_1.StructureType) {\r\n return parsed.getComponents().length;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.SelectPerformance = SelectPerformance;\r\n//# sourceMappingURL=select_performance.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_performance.js?");
12438
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SelectPerformance = exports.SelectPerformanceConf = void 0;\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst structure_type_1 = __webpack_require__(/*! ../abap/types/basic/structure_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/structure_type.js\");\r\nconst DEFAULT_COLUMNS = 10;\r\nclass SelectPerformanceConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** Detects ENDSELECT */\r\n this.endSelect = true;\r\n /** Detects SELECT * */\r\n this.selectStar = true;\r\n /** \"SELECT\" * is considered okay if the table is less than X columns, the table must be known to the linter */\r\n this.starOkayIfFewColumns = DEFAULT_COLUMNS;\r\n }\r\n}\r\nexports.SelectPerformanceConf = SelectPerformanceConf;\r\nclass SelectPerformance {\r\n constructor() {\r\n this.conf = new SelectPerformanceConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"select_performance\",\r\n title: \"SELECT performance\",\r\n shortDescription: `Various checks regarding SELECT performance.`,\r\n extendedInformation: `ENDSELECT: not reported when the corresponding SELECT has PACKAGE SIZE\r\n\r\nSELECT *: not reported if using INTO/APPENDING CORRESPONDING FIELDS OF`,\r\n tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Performance],\r\n };\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n getConfig() {\r\n if (this.conf.starOkayIfFewColumns === undefined) {\r\n this.conf.starOkayIfFewColumns = DEFAULT_COLUMNS;\r\n }\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n const issues = [];\r\n for (const file of obj.getABAPFiles()) {\r\n const stru = file.getStructure();\r\n if (stru === undefined) {\r\n return issues;\r\n }\r\n if (this.conf.endSelect) {\r\n for (const s of stru.findAllStructures(Structures.Select) || []) {\r\n const select = s.findDirectStatement(Statements.SelectLoop);\r\n if (select === undefined || select.concatTokens().toUpperCase().includes(\"PACKAGE SIZE\")) {\r\n continue;\r\n }\r\n const message = \"Avoid use of ENDSELECT\";\r\n issues.push(issue_1.Issue.atStatement(file, select, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n if (this.conf.selectStar) {\r\n const spaghetti = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti;\r\n const selects = stru.findAllStatements(Statements.Select);\r\n selects.push(...stru.findAllStatements(Statements.SelectLoop));\r\n for (const s of selects) {\r\n const concat = s.concatTokens().toUpperCase();\r\n if (concat.startsWith(\"SELECT * \") === false\r\n && concat.startsWith(\"SELECT SINGLE * \") === false) {\r\n continue;\r\n }\r\n else if (concat.includes(\" INTO CORRESPONDING FIELDS OF \")\r\n || concat.includes(\" APPENDING CORRESPONDING FIELDS OF \")) {\r\n continue;\r\n }\r\n const columnCount = this.findNumberOfColumns(s, file, spaghetti);\r\n if (columnCount\r\n && columnCount <= this.getConfig().starOkayIfFewColumns) {\r\n continue;\r\n }\r\n const message = \"Avoid use of SELECT *\";\r\n issues.push(issue_1.Issue.atToken(file, s.getFirstToken(), message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n findNumberOfColumns(s, file, spaghetti) {\r\n const dbnames = s.findAllExpressions(Expressions.DatabaseTable);\r\n if (dbnames.length === 1) {\r\n const start = dbnames[0].getFirstToken().getStart();\r\n const scope = spaghetti.lookupPosition(start, file.getFilename());\r\n const name = scope === null || scope === void 0 ? void 0 : scope.findTableReference(start);\r\n const tabl = this.reg.getObject(\"TABL\", name);\r\n const parsed = tabl === null || tabl === void 0 ? void 0 : tabl.parseType(this.reg);\r\n if (parsed instanceof structure_type_1.StructureType) {\r\n return parsed.getComponents().length;\r\n }\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.SelectPerformance = SelectPerformance;\r\n//# sourceMappingURL=select_performance.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/select_performance.js?");
12417
12439
 
12418
12440
  /***/ }),
12419
12441
 
@@ -12457,7 +12479,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12457
12479
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12458
12480
 
12459
12481
  "use strict";
12460
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SICFConsistency = exports.SICFConsistencyConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass SICFConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SICFConsistencyConf = SICFConsistencyConf;\r\nclass SICFConsistency {\r\n constructor() {\r\n this.conf = new SICFConsistencyConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"sicf_consistency\",\r\n title: \"SICF consistency\",\r\n shortDescription: `Checks the validity of ICF services:\n\n* Class defined in handler must exist\n* Class must not have any syntax errors\n* Class must implement interface IF_HTTP_EXTENSION`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n const issues = [];\r\n if (!(obj instanceof objects_1.ICFService)) {\r\n return [];\r\n }\r\n const handlers = obj.getHandlerList();\r\n if (handlers === undefined) {\r\n return [];\r\n }\r\n for (const h of handlers) {\r\n const clas = this.reg.getObject(\"CLAS\", h);\r\n if (clas === undefined) {\r\n const pattern = new RegExp(this.reg.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\r\n if (pattern.test(h) === true) {\r\n const message = \"Handler class \" + h + \" not found\";\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n continue;\r\n }\r\n const def = clas.getClassDefinition();\r\n if (def === undefined) {\r\n const message = \"Syntax error in class \" + h;\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n const implementing = this.findImplementing(def);\r\n if (implementing.findIndex((i) => { return i.name.toUpperCase() === \"IF_HTTP_EXTENSION\"; }) < 0) {\r\n const message = \"Handler class \" + h + \" must implement IF_HTTP_EXTENSION\";\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////////////\r\n findImplementing(def) {\r\n let ret = def.interfaces;\r\n let superName = def.superClassName;\r\n while (superName !== undefined) {\r\n const clas = this.reg.getObject(\"CLAS\", superName);\r\n if (clas === undefined) {\r\n break;\r\n }\r\n const superDef = clas.getClassDefinition();\r\n if (superDef === undefined) {\r\n break;\r\n }\r\n ret = ret.concat(superDef.interfaces);\r\n superName = superDef.superClassName;\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.SICFConsistency = SICFConsistency;\r\n//# sourceMappingURL=sicf_consistency.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js?");
12482
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SICFConsistency = exports.SICFConsistencyConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass SICFConsistencyConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SICFConsistencyConf = SICFConsistencyConf;\r\nclass SICFConsistency {\r\n constructor() {\r\n this.conf = new SICFConsistencyConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"sicf_consistency\",\r\n title: \"SICF consistency\",\r\n shortDescription: `Checks the validity of ICF services:\r\n\r\n* Class defined in handler must exist\r\n* Class must not have any syntax errors\r\n* Class must implement interface IF_HTTP_EXTENSION`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n const issues = [];\r\n if (!(obj instanceof objects_1.ICFService)) {\r\n return [];\r\n }\r\n const handlers = obj.getHandlerList();\r\n if (handlers === undefined) {\r\n return [];\r\n }\r\n for (const h of handlers) {\r\n const clas = this.reg.getObject(\"CLAS\", h);\r\n if (clas === undefined) {\r\n const pattern = new RegExp(this.reg.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\r\n if (pattern.test(h) === true) {\r\n const message = \"Handler class \" + h + \" not found\";\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n continue;\r\n }\r\n const def = clas.getClassDefinition();\r\n if (def === undefined) {\r\n const message = \"Syntax error in class \" + h;\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n const implementing = this.findImplementing(def);\r\n if (implementing.findIndex((i) => { return i.name.toUpperCase() === \"IF_HTTP_EXTENSION\"; }) < 0) {\r\n const message = \"Handler class \" + h + \" must implement IF_HTTP_EXTENSION\";\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], new position_1.Position(1, 1), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue;\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////////////\r\n findImplementing(def) {\r\n let ret = def.interfaces;\r\n let superName = def.superClassName;\r\n while (superName !== undefined) {\r\n const clas = this.reg.getObject(\"CLAS\", superName);\r\n if (clas === undefined) {\r\n break;\r\n }\r\n const superDef = clas.getClassDefinition();\r\n if (superDef === undefined) {\r\n break;\r\n }\r\n ret = ret.concat(superDef.interfaces);\r\n superName = superDef.superClassName;\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.SICFConsistency = SICFConsistency;\r\n//# sourceMappingURL=sicf_consistency.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/sicf_consistency.js?");
12461
12483
 
12462
12484
  /***/ }),
12463
12485
 
@@ -12479,7 +12501,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12479
12501
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12480
12502
 
12481
12503
  "use strict";
12482
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SpaceBeforeDot = exports.SpaceBeforeDotConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass SpaceBeforeDotConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.ignoreGlobalDefinition = true;\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.SpaceBeforeDotConf = SpaceBeforeDotConf;\r\nclass SpaceBeforeDot extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SpaceBeforeDotConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"space_before_dot\",\r\n title: \"Space before dot\",\r\n shortDescription: `Checks for extra spaces before dots at the ends of statements`,\r\n extendedInformation: `\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `WRITE bar .`,\r\n goodExample: `WRITE bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Remove space before \\\",\\\" or \\\".\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n let prev = undefined;\r\n let startRow = 0;\r\n if (file.getStructure() === undefined) {\r\n // some parser error exists in file\r\n return [];\r\n }\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (this.conf.ignoreGlobalDefinition) {\r\n const structure = file.getStructure();\r\n if (obj instanceof objects_1.Class && structure !== undefined) {\r\n const endclass = structure.findFirstStatement(Statements.EndClass);\r\n if (endclass !== undefined) {\r\n startRow = endclass.getFirstToken().getRow();\r\n }\r\n const definition = obj.getClassDefinition();\r\n if (definition !== undefined && this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n else if (obj instanceof objects_1.Interface && structure !== undefined) {\r\n const endinterface = structure.findFirstStatement(Statements.EndInterface);\r\n if (endinterface !== undefined) {\r\n startRow = endinterface.getFirstToken().getRow();\r\n }\r\n }\r\n }\r\n for (const t of file.getTokens()) {\r\n if (t.getRow() < startRow) {\r\n continue;\r\n }\r\n if (prev !== undefined && t instanceof tokens_1.Punctuation && prev.getCol() + prev.getStr().length < t.getCol()) {\r\n const start = new position_1.Position(t.getStart().getRow(), prev.getEnd().getCol());\r\n const end = new position_1.Position(t.getStart().getRow(), t.getStart().getCol());\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);\r\n const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n prev = t;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SpaceBeforeDot = SpaceBeforeDot;\r\n//# sourceMappingURL=space_before_dot.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/space_before_dot.js?");
12504
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SpaceBeforeDot = exports.SpaceBeforeDotConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\r\nclass SpaceBeforeDotConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n this.ignoreGlobalDefinition = true;\r\n this.ignoreExceptions = true;\r\n }\r\n}\r\nexports.SpaceBeforeDotConf = SpaceBeforeDotConf;\r\nclass SpaceBeforeDot extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SpaceBeforeDotConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"space_before_dot\",\r\n title: \"Space before dot\",\r\n shortDescription: `Checks for extra spaces before dots at the ends of statements`,\r\n extendedInformation: `\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#be-consistent\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#condense-your-code`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `WRITE bar .`,\r\n goodExample: `WRITE bar.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Remove space before \\\",\\\" or \\\".\\\"\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n let prev = undefined;\r\n let startRow = 0;\r\n if (file.getStructure() === undefined) {\r\n // some parser error exists in file\r\n return [];\r\n }\r\n const ddic = new ddic_1.DDIC(this.reg);\r\n if (this.conf.ignoreGlobalDefinition) {\r\n const structure = file.getStructure();\r\n if (obj instanceof objects_1.Class && structure !== undefined) {\r\n const endclass = structure.findFirstStatement(Statements.EndClass);\r\n if (endclass !== undefined) {\r\n startRow = endclass.getFirstToken().getRow();\r\n }\r\n const definition = obj.getClassDefinition();\r\n if (definition !== undefined && this.conf.ignoreExceptions && ddic.isException(definition, obj)) {\r\n return [];\r\n }\r\n }\r\n else if (obj instanceof objects_1.Interface && structure !== undefined) {\r\n const endinterface = structure.findFirstStatement(Statements.EndInterface);\r\n if (endinterface !== undefined) {\r\n startRow = endinterface.getFirstToken().getRow();\r\n }\r\n }\r\n }\r\n for (const t of file.getTokens()) {\r\n if (t.getRow() < startRow) {\r\n continue;\r\n }\r\n if (prev !== undefined && t instanceof tokens_1.Punctuation && prev.getCol() + prev.getStr().length < t.getCol()) {\r\n const start = new position_1.Position(t.getStart().getRow(), prev.getEnd().getCol());\r\n const end = new position_1.Position(t.getStart().getRow(), t.getStart().getCol());\r\n const fix = edit_helper_1.EditHelper.deleteRange(file, start, end);\r\n const issue = issue_1.Issue.atRange(file, start, end, this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n prev = t;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SpaceBeforeDot = SpaceBeforeDot;\r\n//# sourceMappingURL=space_before_dot.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/space_before_dot.js?");
12483
12505
 
12484
12506
  /***/ }),
12485
12507
 
@@ -12501,7 +12523,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12501
12523
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12502
12524
 
12503
12525
  "use strict";
12504
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StartAtTab = exports.StartAtTabConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass StartAtTabConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.StartAtTabConf = StartAtTabConf;\r\nclass StartAtTab extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new StartAtTabConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"start_at_tab\",\r\n title: \"Start at tab\",\r\n shortDescription: `Checks that statements start at tabstops.`,\r\n extendedInformation: `Reports max 100 issues per file\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: ` WRITE a.`,\r\n goodExample: ` WRITE a.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Start statement at tab position\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let inType = false;\r\n let previous = undefined;\r\n const raw = file.getRawRows();\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.get() instanceof statements_1.TypeBegin) {\r\n inType = true;\r\n }\r\n else if (statement.get() instanceof statements_1.TypeEnd) {\r\n inType = false;\r\n }\r\n else if (inType) {\r\n continue;\r\n }\r\n const pos = statement.getStart();\r\n if (previous !== undefined && pos.getRow() === previous.getRow()) {\r\n continue;\r\n }\r\n // just skip rows that contains tabs, this will be reported by the contains_tab rule\r\n if ((pos.getCol() - 1) % 2 !== 0 && raw[pos.getRow() - 1].includes(\"\\t\") === false) {\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n if (issues.length >= 100) {\r\n return issues; // only max 100 issues perfile\r\n }\r\n }\r\n previous = pos;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.StartAtTab = StartAtTab;\r\n//# sourceMappingURL=start_at_tab.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/start_at_tab.js?");
12526
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StartAtTab = exports.StartAtTabConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass StartAtTabConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.StartAtTabConf = StartAtTabConf;\r\nclass StartAtTab extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new StartAtTabConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"start_at_tab\",\r\n title: \"Start at tab\",\r\n shortDescription: `Checks that statements start at tabstops.`,\r\n extendedInformation: `Reports max 100 issues per file\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#indent-and-snap-to-tab`,\r\n tags: [_irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: ` WRITE a.`,\r\n goodExample: ` WRITE a.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"Start statement at tab position\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let inType = false;\r\n let previous = undefined;\r\n const raw = file.getRawRows();\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.get() instanceof statements_1.TypeBegin) {\r\n inType = true;\r\n }\r\n else if (statement.get() instanceof statements_1.TypeEnd) {\r\n inType = false;\r\n }\r\n else if (inType) {\r\n continue;\r\n }\r\n const pos = statement.getStart();\r\n if (previous !== undefined && pos.getRow() === previous.getRow()) {\r\n continue;\r\n }\r\n // just skip rows that contains tabs, this will be reported by the contains_tab rule\r\n if ((pos.getCol() - 1) % 2 !== 0 && raw[pos.getRow() - 1].includes(\"\\t\") === false) {\r\n const issue = issue_1.Issue.atPosition(file, pos, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n if (issues.length >= 100) {\r\n return issues; // only max 100 issues perfile\r\n }\r\n }\r\n previous = pos;\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.StartAtTab = StartAtTab;\r\n//# sourceMappingURL=start_at_tab.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/start_at_tab.js?");
12505
12527
 
12506
12528
  /***/ }),
12507
12529
 
@@ -12534,7 +12556,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12534
12556
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12535
12557
 
12536
12558
  "use strict";
12537
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyModification = exports.SyModificationConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SyModificationConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SyModificationConf = SyModificationConf;\r\nclass SyModification extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SyModificationConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"sy_modification\",\r\n title: \"Modification of SY fields\",\r\n shortDescription: `Finds modification of sy fields`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `\nsy-uname = 2.\nsy = sy.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const t of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Target)) || []) {\r\n const firstChild = t.getChildren()[0];\r\n if (firstChild.get() instanceof Expressions.TargetField\r\n && firstChild.getFirstToken().getStr().toUpperCase() === \"SY\") {\r\n const message = \"Modification of SY field\";\r\n const issue = issue_1.Issue.atToken(file, firstChild.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SyModification = SyModification;\r\n//# sourceMappingURL=sy_modification.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/sy_modification.js?");
12559
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.SyModification = exports.SyModificationConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass SyModificationConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.SyModificationConf = SyModificationConf;\r\nclass SyModification extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new SyModificationConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"sy_modification\",\r\n title: \"Modification of SY fields\",\r\n shortDescription: `Finds modification of sy fields`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abensystem_fields.htm`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `\r\nsy-uname = 2.\r\nsy = sy.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n for (const t of ((_a = file.getStructure()) === null || _a === void 0 ? void 0 : _a.findAllExpressions(Expressions.Target)) || []) {\r\n const firstChild = t.getChildren()[0];\r\n if (firstChild.get() instanceof Expressions.TargetField\r\n && firstChild.getFirstToken().getStr().toUpperCase() === \"SY\") {\r\n const message = \"Modification of SY field\";\r\n const issue = issue_1.Issue.atToken(file, firstChild.getFirstToken(), message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.SyModification = SyModification;\r\n//# sourceMappingURL=sy_modification.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/sy_modification.js?");
12538
12560
 
12539
12561
  /***/ }),
12540
12562
 
@@ -12545,7 +12567,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12545
12567
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12546
12568
 
12547
12569
  "use strict";
12548
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TABLEnhancementCategory = exports.TABLEnhancementCategoryConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass TABLEnhancementCategoryConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.TABLEnhancementCategoryConf = TABLEnhancementCategoryConf;\r\nclass TABLEnhancementCategory {\r\n constructor() {\r\n this.conf = new TABLEnhancementCategoryConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"tabl_enhancement_category\",\r\n title: \"TABL enhancement category must be set\",\r\n shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,\r\n extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.\n\nYou may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,\r\n tags: [],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"TABL enhancement category not classified in \" + name;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Table)) {\r\n return [];\r\n }\r\n if (obj.getEnhancementCategory() === objects_1.EnhancementCategory.NotClassified) {\r\n const position = new position_1.Position(1, 1);\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, this.getDescription(obj.getName()), this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.TABLEnhancementCategory = TABLEnhancementCategory;\r\n//# sourceMappingURL=tabl_enhancement_category.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js?");
12570
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TABLEnhancementCategory = exports.TABLEnhancementCategoryConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst position_1 = __webpack_require__(/*! ../position */ \"./node_modules/@abaplint/core/build/src/position.js\");\r\nclass TABLEnhancementCategoryConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.TABLEnhancementCategoryConf = TABLEnhancementCategoryConf;\r\nclass TABLEnhancementCategory {\r\n constructor() {\r\n this.conf = new TABLEnhancementCategoryConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"tabl_enhancement_category\",\r\n title: \"TABL enhancement category must be set\",\r\n shortDescription: `Checks that tables do not have the enhancement category 'not classified'.`,\r\n extendedInformation: `SAP note 3063227 changes the default to 'Cannot be enhanced'.\r\n\r\nYou may use standard report RS_DDIC_CLASSIFICATION_FINAL for adjustment.`,\r\n tags: [],\r\n };\r\n }\r\n getDescription(name) {\r\n return \"TABL enhancement category not classified in \" + name;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(_reg) {\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Table)) {\r\n return [];\r\n }\r\n if (obj.getEnhancementCategory() === objects_1.EnhancementCategory.NotClassified) {\r\n const position = new position_1.Position(1, 1);\r\n const issue = issue_1.Issue.atPosition(obj.getFiles()[0], position, this.getDescription(obj.getName()), this.getMetadata().key, this.conf.severity);\r\n return [issue];\r\n }\r\n return [];\r\n }\r\n}\r\nexports.TABLEnhancementCategory = TABLEnhancementCategory;\r\n//# sourceMappingURL=tabl_enhancement_category.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/tabl_enhancement_category.js?");
12549
12571
 
12550
12572
  /***/ }),
12551
12573
 
@@ -12655,7 +12677,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12655
12677
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12656
12678
 
12657
12679
  "use strict";
12658
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnusedMethods = exports.UnusedMethodsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UnusedMethodsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UnusedMethodsConf = UnusedMethodsConf;\r\nclass WorkArea {\r\n constructor() {\r\n this.list = [];\r\n this.list = [];\r\n }\r\n push(id) {\r\n this.list.push(id);\r\n }\r\n removeIfExists(id) {\r\n for (let i = 0; i < this.list.length; i++) {\r\n if (id.equals(this.list[i].identifier)) {\r\n this.list.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n containsProteted() {\r\n for (const m of this.list) {\r\n if (m.visibility === visibility_1.Visibility.Protected) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n getLength() {\r\n return this.list.length;\r\n }\r\n get() {\r\n return this.list;\r\n }\r\n}\r\n// todo: add possibility to also search public methods\r\n// todo: for protected methods, also search subclasses\r\nclass UnusedMethods {\r\n constructor() {\r\n this.conf = new UnusedMethodsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unused_methods\",\r\n title: \"Unused methods\",\r\n shortDescription: `Checks for unused methods`,\r\n extendedInformation: `Checks private and protected methods.\n\nSkips:\n* methods FOR TESTING\n* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses\n* class_constructor + constructor methods\n* event handlers\n* methods that are redefined\n* INCLUDEs\n`,\r\n tags: [],\r\n pragma: \"##CALLED\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Interface) { // todo, how to handle interfaces?\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Program && obj.isInclude() === true) {\r\n return [];\r\n }\r\n // dont report anything when there are syntax errors\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, obj).run();\r\n if (syntax.issues.length > 0) {\r\n return [];\r\n }\r\n this.wa = new WorkArea();\r\n for (const file of obj.getABAPFiles()) {\r\n for (const def of file.getInfo().listClassDefinitions()) {\r\n for (const method of def.methods) {\r\n if (method.isForTesting === true\r\n || method.isRedefinition === true\r\n || method.isEventHandler === true) {\r\n continue;\r\n }\r\n else if (def.isForTesting === true\r\n && (method.name.toUpperCase() === \"SETUP\"\r\n || method.name.toUpperCase() === \"CLASS_SETUP\"\r\n || method.name.toUpperCase() === \"TEARDOWN\"\r\n || method.name.toUpperCase() === \"CLASS_TEARDOWN\")) {\r\n continue;\r\n }\r\n else if (method.name.toUpperCase() === \"CONSTRUCTOR\"\r\n || method.name.toUpperCase() === \"CLASS_CONSTRUCTOR\") {\r\n continue;\r\n }\r\n if (method.visibility === visibility_1.Visibility.Private\r\n || method.visibility === visibility_1.Visibility.Protected) {\r\n this.wa.push(method);\r\n }\r\n }\r\n }\r\n }\r\n this.traverse(syntax.spaghetti.getTop());\r\n this.searchGlobalSubclasses(obj);\r\n const issues = [];\r\n for (const i of this.wa.get()) {\r\n const file = obj.getABAPFileByName(i.identifier.getFilename());\r\n if (file === undefined) {\r\n continue;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(i.identifier.getToken(), file);\r\n if (statement === undefined) {\r\n continue;\r\n }\r\n if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {\r\n continue;\r\n }\r\n const message = \"Method \\\"\" + i.identifier.getName() + \"\\\" not used\";\r\n issues.push(issue_1.Issue.atIdentifier(i.identifier, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n return issues;\r\n }\r\n searchGlobalSubclasses(obj) {\r\n var _a, _b;\r\n if (this.wa.getLength() === 0\r\n || !(obj instanceof objects_1.Class)\r\n || this.wa.containsProteted() === false) {\r\n return;\r\n }\r\n const sup = obj.getDefinition();\r\n if (sup === undefined) {\r\n return;\r\n }\r\n for (const r of this.reg.getObjects()) {\r\n if (r instanceof objects_1.Class\r\n && ((_b = (_a = r.getDefinition()) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === sup.getName().toUpperCase()) {\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, r).run();\r\n this.traverse(syntax.spaghetti.getTop());\r\n // recurse to sub-sub-* classes\r\n this.searchGlobalSubclasses(r);\r\n }\r\n }\r\n }\r\n traverse(node) {\r\n if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n this.checkNode(node);\r\n }\r\n for (const c of node.getChildren()) {\r\n this.traverse(c);\r\n }\r\n }\r\n checkNode(node) {\r\n for (const v of node.getData().references) {\r\n if (v.referenceType === _reference_1.ReferenceType.MethodReference && v.resolved) {\r\n this.wa.removeIfExists(v.resolved);\r\n }\r\n }\r\n }\r\n}\r\nexports.UnusedMethods = UnusedMethods;\r\n//# sourceMappingURL=unused_methods.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unused_methods.js?");
12680
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnusedMethods = exports.UnusedMethodsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../abap/4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UnusedMethodsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UnusedMethodsConf = UnusedMethodsConf;\r\nclass WorkArea {\r\n constructor() {\r\n this.list = [];\r\n this.list = [];\r\n }\r\n push(id) {\r\n this.list.push(id);\r\n }\r\n removeIfExists(id) {\r\n for (let i = 0; i < this.list.length; i++) {\r\n if (id.equals(this.list[i].identifier)) {\r\n this.list.splice(i, 1);\r\n return;\r\n }\r\n }\r\n }\r\n containsProteted() {\r\n for (const m of this.list) {\r\n if (m.visibility === visibility_1.Visibility.Protected) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n getLength() {\r\n return this.list.length;\r\n }\r\n get() {\r\n return this.list;\r\n }\r\n}\r\n// todo: add possibility to also search public methods\r\n// todo: for protected methods, also search subclasses\r\nclass UnusedMethods {\r\n constructor() {\r\n this.conf = new UnusedMethodsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unused_methods\",\r\n title: \"Unused methods\",\r\n shortDescription: `Checks for unused methods`,\r\n extendedInformation: `Checks private and protected methods.\r\n\r\nSkips:\r\n* methods FOR TESTING\r\n* methods SETUP + TEARDOWN + CLASS_SETUP + CLASS_TEARDOWN in testclasses\r\n* class_constructor + constructor methods\r\n* event handlers\r\n* methods that are redefined\r\n* INCLUDEs\r\n`,\r\n tags: [],\r\n pragma: \"##CALLED\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Interface) { // todo, how to handle interfaces?\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Program && obj.isInclude() === true) {\r\n return [];\r\n }\r\n // dont report anything when there are syntax errors\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, obj).run();\r\n if (syntax.issues.length > 0) {\r\n return [];\r\n }\r\n this.wa = new WorkArea();\r\n for (const file of obj.getABAPFiles()) {\r\n for (const def of file.getInfo().listClassDefinitions()) {\r\n for (const method of def.methods) {\r\n if (method.isForTesting === true\r\n || method.isRedefinition === true\r\n || method.isEventHandler === true) {\r\n continue;\r\n }\r\n else if (def.isForTesting === true\r\n && (method.name.toUpperCase() === \"SETUP\"\r\n || method.name.toUpperCase() === \"CLASS_SETUP\"\r\n || method.name.toUpperCase() === \"TEARDOWN\"\r\n || method.name.toUpperCase() === \"CLASS_TEARDOWN\")) {\r\n continue;\r\n }\r\n else if (method.name.toUpperCase() === \"CONSTRUCTOR\"\r\n || method.name.toUpperCase() === \"CLASS_CONSTRUCTOR\") {\r\n continue;\r\n }\r\n if (method.visibility === visibility_1.Visibility.Private\r\n || method.visibility === visibility_1.Visibility.Protected) {\r\n this.wa.push(method);\r\n }\r\n }\r\n }\r\n }\r\n this.traverse(syntax.spaghetti.getTop());\r\n this.searchGlobalSubclasses(obj);\r\n const issues = [];\r\n for (const i of this.wa.get()) {\r\n const file = obj.getABAPFileByName(i.identifier.getFilename());\r\n if (file === undefined) {\r\n continue;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(i.identifier.getToken(), file);\r\n if (statement === undefined) {\r\n continue;\r\n }\r\n if (statement.getPragmas().some(t => t.getStr() === this.getMetadata().pragma)) {\r\n continue;\r\n }\r\n const message = \"Method \\\"\" + i.identifier.getName() + \"\\\" not used\";\r\n issues.push(issue_1.Issue.atIdentifier(i.identifier, message, this.getMetadata().key, this.conf.severity));\r\n }\r\n return issues;\r\n }\r\n searchGlobalSubclasses(obj) {\r\n var _a, _b;\r\n if (this.wa.getLength() === 0\r\n || !(obj instanceof objects_1.Class)\r\n || this.wa.containsProteted() === false) {\r\n return;\r\n }\r\n const sup = obj.getDefinition();\r\n if (sup === undefined) {\r\n return;\r\n }\r\n for (const r of this.reg.getObjects()) {\r\n if (r instanceof objects_1.Class\r\n && ((_b = (_a = r.getDefinition()) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === sup.getName().toUpperCase()) {\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, r).run();\r\n this.traverse(syntax.spaghetti.getTop());\r\n // recurse to sub-sub-* classes\r\n this.searchGlobalSubclasses(r);\r\n }\r\n }\r\n }\r\n traverse(node) {\r\n if (node.getIdentifier().stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n this.checkNode(node);\r\n }\r\n for (const c of node.getChildren()) {\r\n this.traverse(c);\r\n }\r\n }\r\n checkNode(node) {\r\n for (const v of node.getData().references) {\r\n if (v.referenceType === _reference_1.ReferenceType.MethodReference && v.resolved) {\r\n this.wa.removeIfExists(v.resolved);\r\n }\r\n }\r\n }\r\n}\r\nexports.UnusedMethods = UnusedMethods;\r\n//# sourceMappingURL=unused_methods.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unused_methods.js?");
12659
12681
 
12660
12682
  /***/ }),
12661
12683
 
@@ -12677,7 +12699,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12677
12699
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12678
12700
 
12679
12701
  "use strict";
12680
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnusedVariables = exports.UnusedVariablesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass UnusedVariablesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** skip specific names, case insensitive\r\n * @uniqueItems true\r\n */\r\n this.skipNames = [];\r\n }\r\n}\r\nexports.UnusedVariablesConf = UnusedVariablesConf;\r\nclass WorkArea {\r\n constructor() {\r\n this.workarea = [];\r\n }\r\n push(id, count = 1) {\r\n for (const w of this.workarea) {\r\n if (id.equals(w.id)) {\r\n return;\r\n }\r\n }\r\n this.workarea.push({ id, count });\r\n }\r\n removeIfExists(id) {\r\n if (id === undefined) {\r\n return;\r\n }\r\n for (let i = 0; i < this.workarea.length; i++) {\r\n if (id.equals(this.workarea[i].id)) {\r\n this.workarea[i].count--;\r\n if (this.workarea[i].count === 0) {\r\n this.workarea.splice(i, 1);\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n get() {\r\n return this.workarea;\r\n }\r\n count() {\r\n return this.workarea.length;\r\n }\r\n}\r\nclass UnusedVariables {\r\n constructor() {\r\n this.conf = new UnusedVariablesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unused_variables\",\r\n title: \"Unused variables\",\r\n shortDescription: `Checks for unused variables and constants`,\r\n extendedInformation: `WARNING: slow\n\nExperimental, might give false positives. Skips event parameters.\n\nNote that this currently does not work if the source code uses macros.\n\nUnused variables are not reported if the object contains syntax errors. Errors found in INCLUDES are reported for the main program.`,\r\n tags: [_irule_1.RuleTag.Quickfix],\r\n pragma: \"##NEEDED\",\r\n pseudoComment: \"EC NEEDED\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.skipNames === undefined) {\r\n this.conf.skipNames = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Interface) { // todo, how to handle interfaces?\r\n return [];\r\n }\r\n // dont report unused variables when there are syntax errors\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, obj).run();\r\n if (syntax.issues.length > 0) {\r\n return [];\r\n }\r\n this.workarea = new WorkArea();\r\n const top = syntax.spaghetti.getTop();\r\n this.buildWorkarea(top, obj);\r\n if (this.workarea.count() === 0) {\r\n return this.buildIssues(obj); // exit early if all types are used\r\n }\r\n this.findUses(top, obj);\r\n for (const o of this.reg.getObjects()) {\r\n if (o === obj) {\r\n continue;\r\n }\r\n else if (o instanceof _abap_object_1.ABAPObject) {\r\n if (this.reg.isDependency(o)) {\r\n continue; // do not search in dependencies\r\n }\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, o).run();\r\n this.findUses(syntax.spaghetti.getTop(), o);\r\n if (this.workarea.count() === 0) {\r\n return this.buildIssues(obj); // exit early if all types are used\r\n }\r\n }\r\n }\r\n return this.buildIssues(obj);\r\n }\r\n findUses(node, obj) {\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.DataReadReference\r\n || r.referenceType === _reference_1.ReferenceType.DataWriteReference\r\n || r.referenceType === _reference_1.ReferenceType.TypeReference) {\r\n this.workarea.removeIfExists(r.resolved);\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n this.findUses(c, obj);\r\n }\r\n }\r\n buildWorkarea(node, obj) {\r\n var _a;\r\n const stype = node.getIdentifier().stype;\r\n if (stype === _scope_type_1.ScopeType.OpenSQL) {\r\n return;\r\n }\r\n for (const c of node.getChildren()) {\r\n this.buildWorkarea(c, obj);\r\n }\r\n if (stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n const vars = node.getData().vars;\r\n for (const name in vars) {\r\n const meta = vars[name].getMeta();\r\n if (((_a = this.conf.skipNames) === null || _a === void 0 ? void 0 : _a.length) > 0\r\n && this.conf.skipNames.some((a) => a.toUpperCase() === name)) {\r\n continue;\r\n }\r\n else if (name === \"ME\"\r\n || name === \"SUPER\"\r\n || meta.includes(\"event_parameter\" /* EventParameter */)) {\r\n // todo, workaround for \"me\" and \"super\", these should somehow be typed to built-in\r\n continue;\r\n }\r\n const isInline = meta.includes(\"inline\" /* InlineDefinition */);\r\n this.workarea.push(vars[name], isInline ? 2 : 1);\r\n }\r\n }\r\n }\r\n buildIssues(obj) {\r\n const ret = [];\r\n for (const w of this.workarea.get()) {\r\n const filename = w.id.getFilename();\r\n if (this.reg.isFileDependency(filename) === true) {\r\n continue;\r\n }\r\n else if (obj instanceof objects_1.Program === false && obj.containsFile(filename) === false) {\r\n continue;\r\n }\r\n const statement = this.findStatement(w.id);\r\n if (statement === null || statement === void 0 ? void 0 : statement.getPragmas().map(t => t.getStr()).includes(this.getMetadata().pragma + \"\")) {\r\n continue;\r\n }\r\n else if (this.suppressedbyPseudo(statement, w.id, obj)) {\r\n continue;\r\n }\r\n const name = w.id.getName();\r\n const message = \"Variable \\\"\" + name.toLowerCase() + \"\\\" not used\";\r\n const fix = this.buildFix(w.id, obj);\r\n ret.push(issue_1.Issue.atIdentifier(w.id, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return ret;\r\n }\r\n suppressedbyPseudo(statement, v, obj) {\r\n if (statement === undefined) {\r\n return false;\r\n }\r\n const file = obj.getABAPFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return false;\r\n }\r\n let next = false;\r\n for (const s of file.getStatements()) {\r\n if (next === true && s.get() instanceof _statement_1.Comment) {\r\n return s.concatTokens().includes(this.getMetadata().pseudoComment + \"\");\r\n }\r\n if (s === statement) {\r\n next = true;\r\n }\r\n }\r\n return false;\r\n }\r\n findStatement(v) {\r\n const file = this.reg.getFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const object = this.reg.findObjectForFile(file);\r\n if (!(object instanceof _abap_object_1.ABAPObject)) {\r\n return undefined;\r\n }\r\n const abapfile = object.getABAPFileByName(v.getFilename());\r\n if (abapfile === undefined) {\r\n return undefined;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(v.getToken(), abapfile);\r\n return statement;\r\n }\r\n buildFix(v, obj) {\r\n const file = obj.getABAPFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(v.getToken(), file);\r\n if (statement === undefined) {\r\n return undefined;\r\n }\r\n else if (statement.get() instanceof Statements.Data) {\r\n return edit_helper_1.EditHelper.deleteStatement(file, statement);\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.UnusedVariables = UnusedVariables;\r\n//# sourceMappingURL=unused_variables.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unused_variables.js?");
12702
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UnusedVariables = exports.UnusedVariablesConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass UnusedVariablesConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** skip specific names, case insensitive\r\n * @uniqueItems true\r\n */\r\n this.skipNames = [];\r\n }\r\n}\r\nexports.UnusedVariablesConf = UnusedVariablesConf;\r\nclass WorkArea {\r\n constructor() {\r\n this.workarea = [];\r\n }\r\n push(id, count = 1) {\r\n for (const w of this.workarea) {\r\n if (id.equals(w.id)) {\r\n return;\r\n }\r\n }\r\n this.workarea.push({ id, count });\r\n }\r\n removeIfExists(id) {\r\n if (id === undefined) {\r\n return;\r\n }\r\n for (let i = 0; i < this.workarea.length; i++) {\r\n if (id.equals(this.workarea[i].id)) {\r\n this.workarea[i].count--;\r\n if (this.workarea[i].count === 0) {\r\n this.workarea.splice(i, 1);\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n get() {\r\n return this.workarea;\r\n }\r\n count() {\r\n return this.workarea.length;\r\n }\r\n}\r\nclass UnusedVariables {\r\n constructor() {\r\n this.conf = new UnusedVariablesConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"unused_variables\",\r\n title: \"Unused variables\",\r\n shortDescription: `Checks for unused variables and constants`,\r\n extendedInformation: `WARNING: slow\r\n\r\nExperimental, might give false positives. Skips event parameters.\r\n\r\nNote that this currently does not work if the source code uses macros.\r\n\r\nUnused variables are not reported if the object contains syntax errors. Errors found in INCLUDES are reported for the main program.`,\r\n tags: [_irule_1.RuleTag.Quickfix],\r\n pragma: \"##NEEDED\",\r\n pseudoComment: \"EC NEEDED\",\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n if (this.conf.skipNames === undefined) {\r\n this.conf.skipNames = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n return [];\r\n }\r\n else if (obj instanceof objects_1.Interface) { // todo, how to handle interfaces?\r\n return [];\r\n }\r\n // dont report unused variables when there are syntax errors\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, obj).run();\r\n if (syntax.issues.length > 0) {\r\n return [];\r\n }\r\n this.workarea = new WorkArea();\r\n const top = syntax.spaghetti.getTop();\r\n this.buildWorkarea(top, obj);\r\n if (this.workarea.count() === 0) {\r\n return this.buildIssues(obj); // exit early if all types are used\r\n }\r\n this.findUses(top, obj);\r\n for (const o of this.reg.getObjects()) {\r\n if (o === obj) {\r\n continue;\r\n }\r\n else if (o instanceof _abap_object_1.ABAPObject) {\r\n if (this.reg.isDependency(o)) {\r\n continue; // do not search in dependencies\r\n }\r\n const syntax = new syntax_1.SyntaxLogic(this.reg, o).run();\r\n this.findUses(syntax.spaghetti.getTop(), o);\r\n if (this.workarea.count() === 0) {\r\n return this.buildIssues(obj); // exit early if all types are used\r\n }\r\n }\r\n }\r\n return this.buildIssues(obj);\r\n }\r\n findUses(node, obj) {\r\n for (const r of node.getData().references) {\r\n if (r.referenceType === _reference_1.ReferenceType.DataReadReference\r\n || r.referenceType === _reference_1.ReferenceType.DataWriteReference\r\n || r.referenceType === _reference_1.ReferenceType.TypeReference) {\r\n this.workarea.removeIfExists(r.resolved);\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n this.findUses(c, obj);\r\n }\r\n }\r\n buildWorkarea(node, obj) {\r\n var _a;\r\n const stype = node.getIdentifier().stype;\r\n if (stype === _scope_type_1.ScopeType.OpenSQL) {\r\n return;\r\n }\r\n for (const c of node.getChildren()) {\r\n this.buildWorkarea(c, obj);\r\n }\r\n if (stype !== _scope_type_1.ScopeType.BuiltIn) {\r\n const vars = node.getData().vars;\r\n for (const name in vars) {\r\n const meta = vars[name].getMeta();\r\n if (((_a = this.conf.skipNames) === null || _a === void 0 ? void 0 : _a.length) > 0\r\n && this.conf.skipNames.some((a) => a.toUpperCase() === name)) {\r\n continue;\r\n }\r\n else if (name === \"ME\"\r\n || name === \"SUPER\"\r\n || meta.includes(\"event_parameter\" /* EventParameter */)) {\r\n // todo, workaround for \"me\" and \"super\", these should somehow be typed to built-in\r\n continue;\r\n }\r\n const isInline = meta.includes(\"inline\" /* InlineDefinition */);\r\n this.workarea.push(vars[name], isInline ? 2 : 1);\r\n }\r\n }\r\n }\r\n buildIssues(obj) {\r\n const ret = [];\r\n for (const w of this.workarea.get()) {\r\n const filename = w.id.getFilename();\r\n if (this.reg.isFileDependency(filename) === true) {\r\n continue;\r\n }\r\n else if (obj instanceof objects_1.Program === false && obj.containsFile(filename) === false) {\r\n continue;\r\n }\r\n const statement = this.findStatement(w.id);\r\n if (statement === null || statement === void 0 ? void 0 : statement.getPragmas().map(t => t.getStr()).includes(this.getMetadata().pragma + \"\")) {\r\n continue;\r\n }\r\n else if (this.suppressedbyPseudo(statement, w.id, obj)) {\r\n continue;\r\n }\r\n const name = w.id.getName();\r\n const message = \"Variable \\\"\" + name.toLowerCase() + \"\\\" not used\";\r\n const fix = this.buildFix(w.id, obj);\r\n ret.push(issue_1.Issue.atIdentifier(w.id, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n return ret;\r\n }\r\n suppressedbyPseudo(statement, v, obj) {\r\n if (statement === undefined) {\r\n return false;\r\n }\r\n const file = obj.getABAPFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return false;\r\n }\r\n let next = false;\r\n for (const s of file.getStatements()) {\r\n if (next === true && s.get() instanceof _statement_1.Comment) {\r\n return s.concatTokens().includes(this.getMetadata().pseudoComment + \"\");\r\n }\r\n if (s === statement) {\r\n next = true;\r\n }\r\n }\r\n return false;\r\n }\r\n findStatement(v) {\r\n const file = this.reg.getFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const object = this.reg.findObjectForFile(file);\r\n if (!(object instanceof _abap_object_1.ABAPObject)) {\r\n return undefined;\r\n }\r\n const abapfile = object.getABAPFileByName(v.getFilename());\r\n if (abapfile === undefined) {\r\n return undefined;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(v.getToken(), abapfile);\r\n return statement;\r\n }\r\n buildFix(v, obj) {\r\n const file = obj.getABAPFileByName(v.getFilename());\r\n if (file === undefined) {\r\n return undefined;\r\n }\r\n const statement = edit_helper_1.EditHelper.findStatement(v.getToken(), file);\r\n if (statement === undefined) {\r\n return undefined;\r\n }\r\n else if (statement.get() instanceof Statements.Data) {\r\n return edit_helper_1.EditHelper.deleteStatement(file, statement);\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.UnusedVariables = UnusedVariables;\r\n//# sourceMappingURL=unused_variables.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/unused_variables.js?");
12681
12703
 
12682
12704
  /***/ }),
12683
12705
 
@@ -12688,7 +12710,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12688
12710
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12689
12711
 
12690
12712
  "use strict";
12691
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseBoolExpression = exports.UseBoolExpressionConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\n// note this rule assumes abap_true and abap_false is used for boolean variables\r\n// some other rule will in the future find assignments to abap_bool that are not abap_true/abap_false/abap_undefined\r\nclass UseBoolExpressionConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseBoolExpressionConf = UseBoolExpressionConf;\r\nclass UseBoolExpression extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseBoolExpressionConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_bool_expression\",\r\n title: \"Use boolean expression\",\r\n shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `IF line IS INITIAL.\n has_entries = abap_false.\nELSE.\n has_entries = abap_true.\nENDIF.\n\nDATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,\r\n goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).\n\nDATA(fsdf) = xsdbool( foo <> bar ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n const issues = [];\r\n const stru = file.getStructure();\r\n const version = this.reg.getConfig().getVersion();\r\n if (stru === undefined || (version < version_1.Version.v702 && version !== version_1.Version.Cloud)) {\r\n return [];\r\n }\r\n for (const i of stru.findAllStructures(Structures.If)) {\r\n if (i.findDirectStructure(Structures.ElseIf) !== undefined) {\r\n continue;\r\n }\r\n const bodyNodes = (_a = i.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.findAllStatementNodes();\r\n if (bodyNodes === undefined || bodyNodes.length !== 1) {\r\n continue;\r\n }\r\n const bodyStatement = bodyNodes[0];\r\n if (!(bodyStatement.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n const elseNodes = (_c = (_b = i.findDirectStructure(Structures.Else)) === null || _b === void 0 ? void 0 : _b.findDirectStructure(Structures.Body)) === null || _c === void 0 ? void 0 : _c.findAllStatementNodes();\r\n if (elseNodes === undefined || elseNodes.length !== 1) {\r\n continue;\r\n }\r\n const elseStatement = elseNodes[0];\r\n if (!(elseStatement.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n let bodyTarget = (_d = bodyStatement.findFirstExpression(Expressions.Target)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n if (bodyTarget === null || bodyTarget === void 0 ? void 0 : bodyTarget.startsWith(\"DATA(\")) {\r\n bodyTarget = bodyTarget.substr(5, bodyTarget.length - 6);\r\n }\r\n const elseTarget = (_e = elseStatement.findFirstExpression(Expressions.Target)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n if (bodyTarget === undefined\r\n || elseTarget === undefined\r\n || bodyTarget.toUpperCase() !== elseTarget.toUpperCase()) {\r\n continue;\r\n }\r\n const bodySource = (_f = bodyStatement.findFirstExpression(Expressions.Source)) === null || _f === void 0 ? void 0 : _f.concatTokens().toUpperCase();\r\n const elseSource = (_g = elseStatement.findFirstExpression(Expressions.Source)) === null || _g === void 0 ? void 0 : _g.concatTokens().toUpperCase();\r\n if ((bodySource === \"ABAP_TRUE\" && elseSource === \"ABAP_FALSE\")\r\n || (bodySource === \"ABAP_FALSE\" && elseSource === \"ABAP_TRUE\")) {\r\n const func = (this.reg.getConfig().getVersion() >= version_1.Version.v740sp08\r\n || this.reg.getConfig().getVersion() === version_1.Version.Cloud) ? \"xsdbool\" : \"boolc\";\r\n const negate = bodySource === \"ABAP_FALSE\";\r\n const message = `Use ${func} instead of IF` + (negate ? \", negate expression\" : \"\");\r\n const start = i.getFirstToken().getStart();\r\n const end = i.getLastToken().getEnd();\r\n const statement = bodyTarget + \" = \" + func + \"( \" +\r\n (negate ? \"NOT ( \" : \"\") +\r\n ((_j = (_h = i.findFirstStatement(Statements.If)) === null || _h === void 0 ? void 0 : _h.findFirstExpression(Expressions.Cond)) === null || _j === void 0 ? void 0 : _j.concatTokens()) +\r\n (negate ? \" )\" : \"\") +\r\n \" ).\";\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, start, end, statement);\r\n issues.push(issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n if (version >= version_1.Version.v740sp08 || version === version_1.Version.Cloud) {\r\n for (const b of stru.findAllExpressions(Expressions.CondBody)) {\r\n const concat = b.concatTokens().toUpperCase();\r\n if (concat.endsWith(\" THEN ABAP_TRUE ELSE ABAP_FALSE\")\r\n || concat.endsWith(\" THEN ABAP_TRUE\")\r\n || concat.endsWith(\" THEN ABAP_FALSE ELSE ABAP_TRUE\")) {\r\n const message = \"Use xsdbool\";\r\n // eslint-disable-next-line max-len\r\n issues.push(issue_1.Issue.atRange(file, b.getFirstToken().getStart(), b.getLastToken().getEnd(), message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.UseBoolExpression = UseBoolExpression;\r\n//# sourceMappingURL=use_bool_expression.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js?");
12713
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseBoolExpression = exports.UseBoolExpressionConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\n// note this rule assumes abap_true and abap_false is used for boolean variables\r\n// some other rule will in the future find assignments to abap_bool that are not abap_true/abap_false/abap_undefined\r\nclass UseBoolExpressionConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseBoolExpressionConf = UseBoolExpressionConf;\r\nclass UseBoolExpression extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseBoolExpressionConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_bool_expression\",\r\n title: \"Use boolean expression\",\r\n shortDescription: `Use boolean expression, xsdbool from 740sp08 and up, boolc from 702 and up`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-xsdbool-to-set-boolean-variables`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n badExample: `IF line IS INITIAL.\r\n has_entries = abap_false.\r\nELSE.\r\n has_entries = abap_true.\r\nENDIF.\r\n\r\nDATA(fsdf) = COND #( WHEN foo <> bar THEN abap_true ELSE abap_false ).`,\r\n goodExample: `DATA(has_entries) = xsdbool( line IS NOT INITIAL ).\r\n\r\nDATA(fsdf) = xsdbool( foo <> bar ).`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n const issues = [];\r\n const stru = file.getStructure();\r\n const version = this.reg.getConfig().getVersion();\r\n if (stru === undefined || (version < version_1.Version.v702 && version !== version_1.Version.Cloud)) {\r\n return [];\r\n }\r\n for (const i of stru.findAllStructures(Structures.If)) {\r\n if (i.findDirectStructure(Structures.ElseIf) !== undefined) {\r\n continue;\r\n }\r\n const bodyNodes = (_a = i.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.findAllStatementNodes();\r\n if (bodyNodes === undefined || bodyNodes.length !== 1) {\r\n continue;\r\n }\r\n const bodyStatement = bodyNodes[0];\r\n if (!(bodyStatement.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n const elseNodes = (_c = (_b = i.findDirectStructure(Structures.Else)) === null || _b === void 0 ? void 0 : _b.findDirectStructure(Structures.Body)) === null || _c === void 0 ? void 0 : _c.findAllStatementNodes();\r\n if (elseNodes === undefined || elseNodes.length !== 1) {\r\n continue;\r\n }\r\n const elseStatement = elseNodes[0];\r\n if (!(elseStatement.get() instanceof Statements.Move)) {\r\n continue;\r\n }\r\n let bodyTarget = (_d = bodyStatement.findFirstExpression(Expressions.Target)) === null || _d === void 0 ? void 0 : _d.concatTokens();\r\n if (bodyTarget === null || bodyTarget === void 0 ? void 0 : bodyTarget.startsWith(\"DATA(\")) {\r\n bodyTarget = bodyTarget.substr(5, bodyTarget.length - 6);\r\n }\r\n const elseTarget = (_e = elseStatement.findFirstExpression(Expressions.Target)) === null || _e === void 0 ? void 0 : _e.concatTokens();\r\n if (bodyTarget === undefined\r\n || elseTarget === undefined\r\n || bodyTarget.toUpperCase() !== elseTarget.toUpperCase()) {\r\n continue;\r\n }\r\n const bodySource = (_f = bodyStatement.findFirstExpression(Expressions.Source)) === null || _f === void 0 ? void 0 : _f.concatTokens().toUpperCase();\r\n const elseSource = (_g = elseStatement.findFirstExpression(Expressions.Source)) === null || _g === void 0 ? void 0 : _g.concatTokens().toUpperCase();\r\n if ((bodySource === \"ABAP_TRUE\" && elseSource === \"ABAP_FALSE\")\r\n || (bodySource === \"ABAP_FALSE\" && elseSource === \"ABAP_TRUE\")) {\r\n const func = (this.reg.getConfig().getVersion() >= version_1.Version.v740sp08\r\n || this.reg.getConfig().getVersion() === version_1.Version.Cloud) ? \"xsdbool\" : \"boolc\";\r\n const negate = bodySource === \"ABAP_FALSE\";\r\n const message = `Use ${func} instead of IF` + (negate ? \", negate expression\" : \"\");\r\n const start = i.getFirstToken().getStart();\r\n const end = i.getLastToken().getEnd();\r\n const statement = bodyTarget + \" = \" + func + \"( \" +\r\n (negate ? \"NOT ( \" : \"\") +\r\n ((_j = (_h = i.findFirstStatement(Statements.If)) === null || _h === void 0 ? void 0 : _h.findFirstExpression(Expressions.Cond)) === null || _j === void 0 ? void 0 : _j.concatTokens()) +\r\n (negate ? \" )\" : \"\") +\r\n \" ).\";\r\n const fix = edit_helper_1.EditHelper.replaceRange(file, start, end, statement);\r\n issues.push(issue_1.Issue.atRange(file, start, end, message, this.getMetadata().key, this.conf.severity, fix));\r\n }\r\n }\r\n if (version >= version_1.Version.v740sp08 || version === version_1.Version.Cloud) {\r\n for (const b of stru.findAllExpressions(Expressions.CondBody)) {\r\n const concat = b.concatTokens().toUpperCase();\r\n if (concat.endsWith(\" THEN ABAP_TRUE ELSE ABAP_FALSE\")\r\n || concat.endsWith(\" THEN ABAP_TRUE\")\r\n || concat.endsWith(\" THEN ABAP_FALSE ELSE ABAP_TRUE\")) {\r\n const message = \"Use xsdbool\";\r\n // eslint-disable-next-line max-len\r\n issues.push(issue_1.Issue.atRange(file, b.getFirstToken().getStart(), b.getLastToken().getEnd(), message, this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.UseBoolExpression = UseBoolExpression;\r\n//# sourceMappingURL=use_bool_expression.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_bool_expression.js?");
12692
12714
 
12693
12715
  /***/ }),
12694
12716
 
@@ -12710,7 +12732,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12710
12732
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12711
12733
 
12712
12734
  "use strict";
12713
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseLineExists = exports.UseLineExistsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass UseLineExistsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseLineExistsConf = UseLineExistsConf;\r\nclass UseLineExists extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseLineExistsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_line_exists\",\r\n title: \"Use line_exists\",\r\n shortDescription: `Use line_exists, from 740sp02 and up`,\r\n extendedInformation: `\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at\n\nNot reported if the READ TABLE statement contains BINARY SEARCH.`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.\nIF sy-subrc = 0.\nENDIF.`,\r\n goodExample: `IF line_exists( my_table[ key = 'A' ] ).\nENDIF.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const vers = this.reg.getConfig().getVersion();\r\n if (vers === version_1.Version.OpenABAP) {\r\n return [];\r\n }\r\n else if (vers < version_1.Version.v740sp02 && vers !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (!(statement.get() instanceof Statements.ReadTable)) {\r\n continue;\r\n }\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.includes(\" TRANSPORTING NO FIELDS\") === true\r\n && concat.includes(\" BINARY SEARCH\") === false\r\n && this.checksSubrc(i, statements) === true\r\n && this.usesTabix(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, \"Use line_exists\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////////\r\n checksSubrc(index, statements) {\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n for (const c of statement.findAllExpressions(Expressions.Cond)) {\r\n for (const s of c.findAllExpressions(Expressions.Source)) {\r\n if (s.concatTokens().toUpperCase() === \"SY-SUBRC\") {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n // this is a heuristic, data flow analysis is required to get the correct result\r\n usesTabix(index, statements) {\r\n for (let i = index + 1; i < index + 5; i++) {\r\n const statement = statements[i];\r\n if (statement === undefined) {\r\n break;\r\n }\r\n else if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.concatTokens().toUpperCase().includes(\" SY-TABIX\")) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.UseLineExists = UseLineExists;\r\n//# sourceMappingURL=use_line_exists.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_line_exists.js?");
12735
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseLineExists = exports.UseLineExistsConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js\");\r\nclass UseLineExistsConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseLineExistsConf = UseLineExistsConf;\r\nclass UseLineExists extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseLineExistsConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_line_exists\",\r\n title: \"Use line_exists\",\r\n shortDescription: `Use line_exists, from 740sp02 and up`,\r\n extendedInformation: `\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-line_exists-to-read-table-or-loop-at\r\n\r\nNot reported if the READ TABLE statement contains BINARY SEARCH.`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],\r\n badExample: `READ TABLE my_table TRANSPORTING NO FIELDS WITH KEY key = 'A'.\r\nIF sy-subrc = 0.\r\nENDIF.`,\r\n goodExample: `IF line_exists( my_table[ key = 'A' ] ).\r\nENDIF.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n const vers = this.reg.getConfig().getVersion();\r\n if (vers === version_1.Version.OpenABAP) {\r\n return [];\r\n }\r\n else if (vers < version_1.Version.v740sp02 && vers !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n const statements = file.getStatements();\r\n for (let i = 0; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (!(statement.get() instanceof Statements.ReadTable)) {\r\n continue;\r\n }\r\n const concat = statement.concatTokens().toUpperCase();\r\n if (concat.includes(\" TRANSPORTING NO FIELDS\") === true\r\n && concat.includes(\" BINARY SEARCH\") === false\r\n && this.checksSubrc(i, statements) === true\r\n && this.usesTabix(i, statements) === false) {\r\n issues.push(issue_1.Issue.atStatement(file, statement, \"Use line_exists\", this.getMetadata().key, this.conf.severity));\r\n }\r\n }\r\n return issues;\r\n }\r\n ///////////////////////\r\n checksSubrc(index, statements) {\r\n for (let i = index + 1; i < statements.length; i++) {\r\n const statement = statements[i];\r\n if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n for (const c of statement.findAllExpressions(Expressions.Cond)) {\r\n for (const s of c.findAllExpressions(Expressions.Source)) {\r\n if (s.concatTokens().toUpperCase() === \"SY-SUBRC\") {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n return false;\r\n }\r\n // this is a heuristic, data flow analysis is required to get the correct result\r\n usesTabix(index, statements) {\r\n for (let i = index + 1; i < index + 5; i++) {\r\n const statement = statements[i];\r\n if (statement === undefined) {\r\n break;\r\n }\r\n else if (statement.get() instanceof _statement_1.Comment) {\r\n continue;\r\n }\r\n else if (statement.concatTokens().toUpperCase().includes(\" SY-TABIX\")) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\nexports.UseLineExists = UseLineExists;\r\n//# sourceMappingURL=use_line_exists.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_line_exists.js?");
12714
12736
 
12715
12737
  /***/ }),
12716
12738
 
@@ -12721,7 +12743,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12721
12743
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12722
12744
 
12723
12745
  "use strict";
12724
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\n\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
12746
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\r\n\r\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
12725
12747
 
12726
12748
  /***/ }),
12727
12749
 
@@ -12732,7 +12754,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12732
12754
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12733
12755
 
12734
12756
  "use strict";
12735
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WhenOthersLast = exports.WhenOthersLastConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass WhenOthersLastConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.WhenOthersLastConf = WhenOthersLastConf;\r\nclass WhenOthersLast extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new WhenOthersLastConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"when_others_last\",\r\n title: \"WHEN OTHERS last\",\r\n shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `CASE bar.\n WHEN OTHERS.\n WHEN 2.\nENDCASE.`,\r\n goodExample: `CASE bar.\n WHEN 2.\n WHEN OTHERS.\nENDCASE.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"WHEN OTHERS should be the last branch in a CASE statement.\";\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const struc = file.getStructure();\r\n if (struc === undefined) {\r\n return [];\r\n }\r\n const cases = struc.findAllStructures(Structures.Case);\r\n for (const c of cases) {\r\n const whentop = c.findDirectStructures(Structures.When);\r\n for (let i = 0; i < whentop.length - 1; i++) {\r\n const whens = whentop[i].findDirectStatements(Statements.When).concat(whentop[i].findDirectStatements(Statements.WhenOthers));\r\n for (const when of whens) {\r\n if (when.get() instanceof Statements.WhenOthers) {\r\n const start = when.getFirstToken().getStart();\r\n const issue = issue_1.Issue.atPosition(file, start, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n}\r\nexports.WhenOthersLast = WhenOthersLast;\r\n//# sourceMappingURL=when_others_last.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/when_others_last.js?");
12757
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.WhenOthersLast = exports.WhenOthersLastConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../abap/3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass WhenOthersLastConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.WhenOthersLastConf = WhenOthersLastConf;\r\nclass WhenOthersLast extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new WhenOthersLastConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"when_others_last\",\r\n title: \"WHEN OTHERS last\",\r\n shortDescription: `Checks that WHEN OTHERS is placed the last within a CASE statement.`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `CASE bar.\r\n WHEN OTHERS.\r\n WHEN 2.\r\nENDCASE.`,\r\n goodExample: `CASE bar.\r\n WHEN 2.\r\n WHEN OTHERS.\r\nENDCASE.`,\r\n };\r\n }\r\n getMessage() {\r\n return \"WHEN OTHERS should be the last branch in a CASE statement.\";\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n const struc = file.getStructure();\r\n if (struc === undefined) {\r\n return [];\r\n }\r\n const cases = struc.findAllStructures(Structures.Case);\r\n for (const c of cases) {\r\n const whentop = c.findDirectStructures(Structures.When);\r\n for (let i = 0; i < whentop.length - 1; i++) {\r\n const whens = whentop[i].findDirectStatements(Statements.When).concat(whentop[i].findDirectStatements(Statements.WhenOthers));\r\n for (const when of whens) {\r\n if (when.get() instanceof Statements.WhenOthers) {\r\n const start = when.getFirstToken().getStart();\r\n const issue = issue_1.Issue.atPosition(file, start, this.getMessage(), this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n }\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n}\r\nexports.WhenOthersLast = WhenOthersLast;\r\n//# sourceMappingURL=when_others_last.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/when_others_last.js?");
12736
12758
 
12737
12759
  /***/ }),
12738
12760