From 41547ee4a36f330f9d5d62c931c29716255407cd Mon Sep 17 00:00:00 2001 From: oblomov <102328295+oblomov-dev@users.noreply.github.com> Date: Fri, 16 Jun 2023 10:55:26 +0200 Subject: [PATCH] abaplint fixes (#276) --- abaplint.jsonc | 16 +- src/z2ui5_cl_http_handler.clas.abap | 337 +++++++++--------- ...z2ui5_cl_http_handler.clas.locals_imp.abap | 74 ++-- ...2ui5_cl_http_handler.clas.testclasses.abap | 61 +--- src/z2ui5_cl_xml_view.clas.abap | 168 ++++----- 5 files changed, 311 insertions(+), 345 deletions(-) diff --git a/abaplint.jsonc b/abaplint.jsonc index 3ffa9ae8..6c25b9a0 100644 --- a/abaplint.jsonc +++ b/abaplint.jsonc @@ -16,7 +16,7 @@ "rules": { "7bit_ascii": false, "abapdoc": false, - "align_parameters": false, + "align_parameters": true, "allowed_object_naming": true, "allowed_object_types": true, "ambiguous_statement": true, @@ -45,7 +45,7 @@ "classic_exceptions_overlap": true, "cloud_types": true, "colon_missing_space": true, - "commented_code": false, + "commented_code": true, "constant_classes": { "exclude": [], "severity": "Error", @@ -63,13 +63,13 @@ "severity": "Error", "max": 20 }, - "dangerous_statement": false, + "dangerous_statement": true, "db_operation_in_loop": true, "definitions_top": false, "description_empty": true, "double_space": true, "downport": true, - "empty_line_in_statement": false, + "empty_line_in_statement": true, "empty_statement": true, "empty_structure": { "loop": true, @@ -105,7 +105,7 @@ }, "global_class": true, "identical_conditions": true, - "identical_contents": false, + "identical_contents": true, "identical_descriptions": true, "identical_form_names": true, "if_in_if": true, @@ -114,12 +114,12 @@ "indentation": false, "inline_data_old_versions": true, "intf_referencing_clas": true, - "keep_single_parameter_on_one_line": false, + "keep_single_parameter_on_one_line": true, "keyword_case": false, "line_break_multiple_parameters": false, - "line_break_style": false, + "line_break_style": true, "line_length": false, - "line_only_punc": false, + "line_only_punc": true, "local_class_naming": false, "local_testclass_consistency": true, "local_variable_names": false, diff --git a/src/z2ui5_cl_http_handler.clas.abap b/src/z2ui5_cl_http_handler.clas.abap index 37954908..9201684a 100644 --- a/src/z2ui5_cl_http_handler.clas.abap +++ b/src/z2ui5_cl_http_handler.clas.abap @@ -56,7 +56,7 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. r_result = `` && |\n| && `` && |\n| && lv_sec_policy && |\n| && - ` ` && |\n| && + ` ` && |\n| && ` ` && |\n| && ` ` && |\n| && ` abap2UI5` && |\n| && @@ -77,207 +77,206 @@ CLASS z2ui5_cl_http_handler IMPLEMENTATION. `
` && |\n| && `` && |\n| && `` && |\n|. - r_result = r_result && `` && |\n| && +` sap.z2ui5.checkLogActive = ` && z2ui5_lcl_utility=>get_json_boolean( check_logging ) && `;` && |\n| && + ` });` && |\n| && + `` && |\n| && ``. ENDMETHOD. diff --git a/src/z2ui5_cl_http_handler.clas.locals_imp.abap b/src/z2ui5_cl_http_handler.clas.locals_imp.abap index 0d0216f6..b1aa7e8e 100644 --- a/src/z2ui5_cl_http_handler.clas.locals_imp.abap +++ b/src/z2ui5_cl_http_handler.clas.locals_imp.abap @@ -208,7 +208,7 @@ CLASS z2ui5_lcl_utility IMPLEMENTATION. DELETE lt_attri WHERE visibility <> cl_abap_classdescr=>public. LOOP AT lt_attri INTO DATA(ls_attri) - WHERE type_kind = cl_abap_classdescr=>typekind_struct2 + WHERE type_kind = cl_abap_classdescr=>typekind_struct2 OR type_kind = cl_abap_classdescr=>typekind_struct1. DELETE lt_attri INDEX sy-tabix. @@ -809,10 +809,10 @@ CLASS z2ui5_lcl_fw_app IMPLEMENTATION. DATA(lv_xml_error) = `