Linter gaps and silent cursor no-ops (DEF after ABORT flagged, RETURN/GOTO misuse not flagged, MOVE CURSOR negative/out-of-range accepted)

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
devtools

Research direction

Start by reading src/script_linter*, src/script_parser.cpp, and src/script_executor.cpp, then run the issue's snippets through the linter and executor to reproduce each behavior. Done means definitions after ABORT are not falsely flagged, invalid RETURN/GOTO usage gets static diagnostics, and invalid cursor targets produce a runtime error.

Written by the indexing model from the issue text.

Description

bug
Summary
  • A DEF placed after ABORT is reported "Unreachable code after ABORT" (false positive; definitions are hoisted).
  • RETURN at top level and GOTO inside a DEF pass parse and lint, then fail only at runtime ("RETURN outside of function", "GOTO is not allowed inside functions").
  • MOVE CURSOR AT INPUTFIELD -1 / -2 act as NEXT/PREVIOUS (n ≥ 1 is not validated); MOVE CURSOR AT (0,0) or (99,999) is silently ignored.
Location
  • File(s): src/script_linter*/src/script_parser.cpp, src/script_executor.cpp
Category

error-handling

Severity

low

Reproduction / Evidence

Reproducible at runtime with the library's linter and executor on the snippets above.

Expected Behavior

Static diagnostics for misuse; runtime error for out-of-range cursor targets.

Actual Behavior

As above.

Dominant language
C++
Stars
1
Forks
2
Avg merge
1h 34m
Merged PRs (30d)
7

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from 5250ng/5250script

All issues in 5250ng/5250script

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.