eclipse-che4z / che-che4z-lsp-for-cobol

COBOL Language Support provides autocomplete, highlighting and diagnostics for COBOL code and copybooks
Other
80 stars 57 forks source link

add test cases CICS ABEND #2481

Open KutluOzel-b opened 3 weeks ago

KutluOzel-b commented 3 weeks ago

Checklist:

chacebot commented 2 weeks ago

There needs to be a mechanism in place to check for duplicate options and enforce the required structure for cics_handle_responce, i.e.:

  protected void checkResponseHandlers(CICSParser.Cics_handle_responseContext ruleHandlers) {
    boolean respFound = false;
    List<TerminalNode> respTwoResponseHandlers = new ArrayList<>();
    if (ruleHandlers.cics_inline_handle_exception() != null) {
      List<CICSParser.Cics_respContext> rules =
          ruleHandlers.cics_inline_handle_exception().cics_resp();
      for (CICSParser.Cics_respContext rule : rules) {
        if (rule.RESP() != null) respFound = true;
        if (rule.RESP2() != null) respTwoResponseHandlers.add(rule.RESP2());
      }
    }
    if (!respFound) {
      checkHasIllegalOptions(respTwoResponseHandlers, "RESP2");
    }
  }

Therefore this PR should include the additon of CICSAbendOptionsCheckUtility.java like the other CICS correction PRs.

chacebot commented 1 day ago

@KutluOzel-b Please fix conflicts then ping me so that I can test