Skip to content

nlp --help grouped, with exit codes; a missing input exits 1; -OUT makes its folder (4.2.51) - #811

Merged
ddehilster merged 1 commit into
masterfrom
fix/cli-help-exit-codes
Oct 28, 2026
Merged

ddehilster merged 1 commit into
masterfrom
fix/cli-help-exit-codes

Conversation

@ddehilster

Copy link
Copy Markdown
Member

--help

The old --help was one flat list, and two entries were wrong:

  • -OUT is not an output directory. It is the folder for the run's logs and trees, in place of <input>_log.
  • The second plain argument is that folder, not an "outfile".

The new one:

  • groups the switches: running, debugging, limits and zone mode, compiled analyzers;
  • says -WORK is the engine folder;
  • adds NLP_REC_LIMIT (the limit is N plus N/50 per node, with N 1000 by default; 0 lifts it) and the exit status.

Two fixes it would otherwise have had to describe

  • A missing input file printed "Couldn't create parse instance", left a stray <file>_log folder, and exited 0, which test-nlp.exe segfaults due to missing analyzers #484 was meant to stop. It now says [Error: no such input file: ...] and exits 1.
  • -OUT naming a folder that did not exist was ignored without a word, and everything went to <input>_log. The folder is now made. If it can't be, the run says so and exits 1.

The Python and Node bindings use the analyze() overload that takes the text directly, so neither change touches them.

Tests

Version 4.2.51.

🤖 Generated with Claude Code

…kes its folder (4.2.51)

--help listed every switch in one flat list and got two wrong: -OUT is
not an output directory but the folder for the run's logs and trees, in
place of <input>_log, and the second plain argument is that folder, not
an "outfile". It now groups the switches (running, debugging, limits and
zone mode, compiled analyzers), says -WORK is the engine folder, and adds
NLP_REC_LIMIT and the exit status.

Two behaviors it would otherwise have had to describe:

- A missing input file printed "Couldn't create parse instance", left a
  stray <file>_log folder and exited 0, which #484 meant to stop. It now
  says "[Error: no such input file: ...]" and exits 1.
- -OUT naming a folder that did not exist was ignored without a word,
  and everything went to <input>_log. The folder is now made; if it
  cannot be, the run says so and exits 1.

CI (Linux, Windows): the #484 step also checks a missing input file
(exit 1, no stray folder) and -OUT to a new folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ddehilster
ddehilster merged commit 14b96ec into master Oct 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant