styleguides icon indicating copy to clipboard operation
styleguides copied to clipboard

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

Open markoviclu opened this issue 4 years ago • 1 comments

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.

markoviclu avatar Oct 13 '21 11:10 markoviclu

Similar issues:

  • https://github.com/SAP/code-pal-for-abap/issues/362
  • https://github.com/SAP/styleguides/issues/236

lucasborin avatar Oct 13 '21 11:10 lucasborin

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.

bjoern-jueliger-sap avatar Apr 18 '23 12:04 bjoern-jueliger-sap