Skip to content

Commit

Permalink
prefer_is_not (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
larshp authored Apr 12, 2024
1 parent e3405e5 commit 3207649
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion abaplint.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"identical_conditions": true,
"line_break_style": false,
"many_parentheses": true,
"prefer_is_not": false,
"prefer_is_not": true,
"unused_types": true,
"use_bool_expression": false,
"use_line_exists": false,
Expand Down
10 changes: 5 additions & 5 deletions src/integer/zcl_abappgp_integer.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ CLASS zcl_abappgp_integer IMPLEMENTATION.

ASSERT lv_str CO '-1234567890'.
IF strlen( lv_str ) > 1.
ASSERT NOT lv_str(1) = '0'.
ASSERT lv_str(1) <> '0'.
ENDIF.

CREATE OBJECT ro_integer.
Expand Down Expand Up @@ -1001,7 +1001,7 @@ CLASS zcl_abappgp_integer IMPLEMENTATION.
lo_mult TYPE REF TO zcl_abappgp_integer.


ASSERT NOT io_integer->mv_negative = abap_true.
ASSERT io_integer->mv_negative <> abap_true.

* todo, new protected divide method that returns both quotient and remainder
lo_div = clone( )->divide_knuth( io_integer ).
Expand All @@ -1022,7 +1022,7 @@ CLASS zcl_abappgp_integer IMPLEMENTATION.
lo_exponent TYPE REF TO zcl_abappgp_binary_integer.


ASSERT NOT io_modulus->mv_negative = abap_true.
ASSERT io_modulus->mv_negative <> abap_true.

IF io_modulus->is_one( ) = abap_true.
split( '0' ).
Expand Down Expand Up @@ -1072,7 +1072,7 @@ CLASS zcl_abappgp_integer IMPLEMENTATION.
lo_basem TYPE REF TO zcl_abappgp_montgomery_integer.


ASSERT NOT io_modulus->mv_negative = abap_true.
ASSERT io_modulus->mv_negative <> abap_true.

IF io_modulus->is_one( ) = abap_true.
split( '0' ).
Expand Down Expand Up @@ -1384,7 +1384,7 @@ CLASS zcl_abappgp_integer IMPLEMENTATION.
lo_original TYPE REF TO zcl_abappgp_integer.


ASSERT NOT io_integer->mv_negative = abap_true.
ASSERT io_integer->mv_negative <> abap_true.

IF io_integer->is_zero( ) = abap_true.
split( '1' ).
Expand Down
2 changes: 1 addition & 1 deletion src/integer/zcl_abappgp_integer2.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ CLASS ZCL_ABAPPGP_INTEGER2 IMPLEMENTATION.
lo_int->divide_by_2( ).
ENDWHILE.

IF NOT lv_hex IS INITIAL.
IF lv_hex IS NOT INITIAL.
lv_int = lv_hex.
APPEND lv_int TO ro_integer->mt_split.
ENDIF.
Expand Down
2 changes: 1 addition & 1 deletion src/pgp/zabappgp_keys.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ CLASS lcl_key IMPLEMENTATION.

METHOD init.

IF NOT go_cprivate IS BOUND.
IF go_cprivate IS NOT BOUND.
CREATE OBJECT go_cprivate
EXPORTING
container_name = 'CUSTOM_PRIVATE'.
Expand Down
6 changes: 3 additions & 3 deletions src/pgp/zcl_abappgp_armor.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ CLASS zcl_abappgp_armor IMPLEMENTATION.

METHOD constructor.

ASSERT NOT iv_armor_header IS INITIAL.
ASSERT NOT iv_data IS INITIAL.
ASSERT NOT iv_armor_tail IS INITIAL.
ASSERT iv_armor_header IS NOT INITIAL.
ASSERT iv_data IS NOT INITIAL.
ASSERT iv_armor_tail IS NOT INITIAL.

mv_armor_header = iv_armor_header.
mt_headers = it_headers.
Expand Down
2 changes: 1 addition & 1 deletion src/zabappgp_sign.prog.abap
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CLASS lcl_screen_2000 IMPLEMENTATION.
SET PF-STATUS 'STATUS_2000'.
SET TITLEBAR 'TITLE_2000'.

IF NOT go_container1 IS BOUND.
IF go_container1 IS NOT BOUND.
CREATE OBJECT go_container1
EXPORTING
container_name = 'CUSTOM_INPUT'.
Expand Down
2 changes: 1 addition & 1 deletion src/zcl_abappgp_symmetric.clas.testclasses.abap
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ CLASS ltcl_aes256 IMPLEMENTATION.
iv_ivector = c_ivector
iv_resync = iv_resync ).

IF NOT iv_exp IS INITIAL.
IF iv_exp IS NOT INITIAL.
cl_abap_unit_assert=>assert_equals(
act = lv_enc
exp = iv_exp ).
Expand Down

0 comments on commit 3207649

Please sign in to comment.