"Remove needless parentheses" overshadows "align logical expressions" in list of rules used
Hi Jörg-Michael, thanks for adding support for SELECT statements! While I was testing, I noticed something fishy going on with the display of the "rules used in current selection".
Example:
SELECT *
FROM mara
INTO TABLE @DATA(lt_mara)
WHERE ( matnr = 'A' OR matnr = 'B' )
AND ( lvorm = 'A' ).
Notice the extra spaces before the OR. They are removed by the ABAP Cleaner, but only one rule is shown as used:
If I remove the parenthesis beforehand, another rule surfaces:
Shouldn't both rules be displayed for the first example?
Hi ConjuringCoffee,
hm, yes, you're right. Technically, the reason is this:
So you get the execution of two rules for the price of one :-) Showing both rules in the "Rules Used" list would only make sense if you could then also (locally) deactivate "Align logical expressions" for the current selection in the diff view – I shall give that a try!
Kind regards, Jörg-Michael
P.S.: There are a few other examples where rules run have to other rules, particularly if the 'other rule' is earlier in the execution sequence (ABAP cleaner always runs the rules from top to bottom, meaning that it first runs "Standardize empty lines within methods" on the whole code, then "Separate methods and classes with empty lines" on the whole code etc.)
Ah, I didn't see that! That makes more sense. Knowing that, I would be fine if the behavior stays as-is.