SAP / styleguides

This repository provides SAP style guides for coding and coding-related topics.
Other
1.68k stars 446 forks source link

'Prefer IS NOT to NOT IS' rule misused?! #242

Closed markoviclu closed 1 year ago

markoviclu commented 3 years ago

Hello, I had the following code: if not is_available( ).

this rule implemented in ATC checks forced me to change it to if is_available( ) = abap_false.

I am not happy with the result and I consider the original code better. I understand I can revert the logic of the code completely, but since I do not want to have the most of the method's code inside if-block I prefer this solution. More over this approach is respecting 'Fail fast' rule. Consider this rule implementation refactoring, please.

lucasborin commented 3 years ago

Similar issues:

bjoern-jueliger-sap commented 1 year ago

duplicate of #236, should have been closed with merge of #255.

Note: CodePal issue is still open, but the ATC check implementation is not an issue with the style guide.