Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prefer_is_not #54

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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