abap-cleaner icon indicating copy to clipboard operation
abap-cleaner copied to clipboard

Feature Request: remove "= abap_true" when calling boolean methods

Open vonglan opened this issue 1 year ago • 2 comments

Example:

      IF zcl_m_stock_transfer_order=>is_no_confirmation_necessary( i_reswk = i_line->supplyingPlant
                                                                   i_emwrk = i_line->ReceivingPlant ) = abap_true.

should convert to

      IF zcl_m_stock_transfer_order=>is_no_confirmation_necessary( i_reswk = i_line->supplyingPlant
                                                                   i_emwrk = i_line->ReceivingPlant ).

and maybe replace "= abap_false" in the same context with prefix NOT

vonglan avatar Oct 02 '24 07:10 vonglan

Please note that the ABAP Cleaner can only see the code that is open in the current editor. This rule could therefore only work for method definitions that exist in the current editor.

ConjuringCoffee avatar Oct 21 '24 10:10 ConjuringCoffee

Ah, that reduces the usefulness (substantially, but not to zero)

vonglan avatar Nov 26 '24 10:11 vonglan