SAP / SAP/code-pal-for-abap

From Relational Operator to Predicate Function

Open
#352 3 comments 0 reactions 1 assignee View on GitHub

@lucasborin is already working on this.

Since May 14, 2021.

style guide
Dominant language
ABAP
Stars
435
Forks
77
PR merge metrics
No merged PRs in 30d

Description

How about a new check to convert a relational operator to a predicate function?

‏Relational Operator Predicate Function
o1 CO o2 NOT contains_any_not_of( val = o1 sub = o2 )
o1 CN o2 contains_any_not_of( val = o1 sub = o2 )
o1 CA o2 contains_any_of( val = o1 sub = o2 )
o1 NA o2 NOT contains_any_of( val = o1 sub = o2 )
o1 CS o2 contains( val = to_upper( o1 ) sub = to_upper( o2 ) )
o1 NS o2 NOT contains( val = to_upper( o1 ) sub = to_upper( o2 ) )

Source: https://help.sap.com/doc/abapdocu_750_index_htm/7.50/en-US/abencontains_functions.htm

Most of the non-ABAP developers do not understand the ABAP-specific relational operators.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.