SAP / SAP/code-pal-for-abap

False positives for CHECK statement inside a loop

Open
#603 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

💡 Code pal for ABAP follows the Clean ABAP. If the issue relates to coding style, please submit it here.

Check Name
CHECK Statement Position Check

Actual Behavior
It is showing errors for few CHECK statements which are inside LOOP or DO statements in the methods PREPARE_AIF_MESSAGES, ADD_COSP_AMOUNTS, ADD_COSP_QUANTITIES, of class CL_FINS_CFIN_PD_C2A_REPLICATOR and for the method CHECK_COSP_AMOUNTS_ITEM and local test class of the class CL_FINS_CFIN_PD_C2A_AGENT.

Expected Behavior
According to the documentation of the check, if the check statement occurs inside a loop then it should not shown as an error.

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.

Research direction

Locate the implementation of the CHECK Statement Position Check and reproduce the report using the named methods PREPARE_AIF_MESSAGES, ADD_COSP_AMOUNTS, ADD_COSP_QUANTITIES, and CHECK_COSP_AMOUNTS_ITEM. Compare the behavior for CHECK statements inside LOOP or DO constructs with the check documentation; done when valid statements in those contexts are no longer reported as errors.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.