Skip to content

feat: BASIC cross-reference lint check #19

@acscpt

Description

@acscpt

A new lint command that reports broken line-number references in a BBC BASIC program on a disc image.

Use case

Programs acquired from disc archives often have broken GOTO, GOSUB, or RESTORE references - from editing accidents, incomplete transfers, or line renumbering that missed some targets. Finding these by hand means reading through the entire listing. A lint check identifies them instantly, before the program is loaded into an emulator.

Proposed behaviour

beebtools lint mydisc.ssd T.MYPROG

Reports any GOTO, GOSUB, or RESTORE targets that point to lines which do not exist in the program. Exits with a non-zero status if any broken references are found, making it suitable for scripting.

Works on both DFS and ADFS images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogFor future considerationbasicBBC BASIC relatedcliCommand-line interfaceenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions