update lint config, minor refactors (#3948)

This commit is contained in:
Lars Hvam 2020-09-27 09:24:31 +02:00 committed by GitHub
parent 0edcd79335
commit 1c1b04fbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 15 deletions

View File

@ -72,6 +72,9 @@
"globalMacros": []
},
"rules": {
"identical_contents": false,
"many_parenthesis": true,
"prefer_xsdbool": true,
"prefer_is_not": false,
"use_bool_expression": true,
"check_subrc": false,
@ -160,6 +163,7 @@
"communication": true,
"systemCall": true,
"defaultKey": false,
"describeLines": true,
"break": true,
"statics": true
},
@ -296,6 +300,8 @@
"add": true,
"subtract": true,
"multiply": true,
"typePools": true,
"load": false,
"move": true,
"divide": true,
"fieldSymbolStructure": true,

View File

@ -260,7 +260,7 @@ CLASS ZCL_ABAPGIT_OBJECT_DDLS IMPLEMENTATION.
get_state = 'A'
IMPORTING
got_state = lv_state.
rv_bool = boolc( NOT ( lv_state IS INITIAL ) ).
rv_bool = boolc( NOT lv_state IS INITIAL ).
CATCH cx_root.
rv_bool = abap_false.
ENDTRY.

View File

@ -328,7 +328,7 @@ CLASS ZCL_ABAPGIT_OBJECT_ECATT_SUPER IMPLEMENTATION.
METHOD is_change_more_recent_than.
IF ( is_currently_changed-ldate > is_last_changed-ldate )
IF is_currently_changed-ldate > is_last_changed-ldate
OR ( is_currently_changed-ldate = is_last_changed-ldate
AND is_currently_changed-ltime > is_last_changed-ltime ).

View File

@ -279,8 +279,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDCC IMPLEMENTATION.
DATA: lt_enq TYPE STANDARD TABLE OF seqg3,
lv_subrc TYPE sysubrc,
lv_garg TYPE eqegraarg,
lv_lines TYPE i.
lv_garg TYPE eqegraarg.
lv_garg = ms_item-obj_name.
@ -300,8 +299,7 @@ CLASS ZCL_ABAPGIT_OBJECT_WDCC IMPLEMENTATION.
zcx_abapgit_exception=>raise( 'Error check object lock WDCC: ' && ms_item-obj_name ).
ENDIF.
DESCRIBE TABLE lt_enq LINES lv_lines.
rv_is_locked = boolc( lv_lines > 0 ).
rv_is_locked = boolc( lines( lt_enq ) > 0 ).
ENDMETHOD.

View File

@ -199,9 +199,9 @@ CLASS zcl_abapgit_objects_program IMPLEMENTATION.
<ls_men> TYPE rsmpe_men.
IF cs_adm IS NOT INITIAL
AND ( cs_adm-actcode CO lc_num_n_space
AND cs_adm-actcode CO lc_num_n_space
AND cs_adm-mencode CO lc_num_n_space
AND cs_adm-pfkcode CO lc_num_n_space ). "Check performed in form check_adm of include LSMPIF03
AND cs_adm-pfkcode CO lc_num_n_space. "Check performed in form check_adm of include LSMPIF03
RETURN.
ENDIF.

View File

@ -41,7 +41,7 @@ CLASS ltcl_requirements IMPLEMENTATION.
ENDMETHOD.
METHOD different_fields_are_one_group.
DATA lv_lines TYPE i.
DATA lt_requirements TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt.
mo_cut->set_component( '1' ).
@ -49,14 +49,13 @@ CLASS ltcl_requirements IMPLEMENTATION.
mo_cut->set_min_patch( '1' ).
lt_requirements = mo_cut->get_as_table( ).
DESCRIBE TABLE lt_requirements LINES lv_lines.
cl_abap_unit_assert=>assert_equals( act = lv_lines
cl_abap_unit_assert=>assert_equals( act = lines( lt_requirements )
exp = 1 ).
ENDMETHOD.
METHOD repeat_field_adds_new_group.
DATA lv_lines TYPE i.
DATA lt_requirements TYPE zif_abapgit_dot_abapgit=>ty_requirement_tt.
mo_cut->set_component( '1' ).
@ -64,9 +63,8 @@ CLASS ltcl_requirements IMPLEMENTATION.
mo_cut->set_component( '1' ).
lt_requirements = mo_cut->get_as_table( ).
DESCRIBE TABLE lt_requirements LINES lv_lines.
cl_abap_unit_assert=>assert_equals( act = lv_lines
cl_abap_unit_assert=>assert_equals( act = lines( lt_requirements )
exp = 2 ).
ENDMETHOD.

View File

@ -190,7 +190,7 @@ CLASS ZCL_ABAPGIT_ADT_LINK IMPLEMENTATION.
RECEIVING
result = lv_vit_wb_request.
rv_is_adt_jump_possible = boolc( NOT ( lv_vit_wb_request = abap_true ) ).
rv_is_adt_jump_possible = boolc( NOT lv_vit_wb_request = abap_true ).
CATCH cx_root.
zcx_abapgit_exception=>raise( 'ADT Jump Error' ).