Skip to content

fix: reject unknown CLI options before scanning - #13

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Gambit-Checkmate:fix/reject-unknown-cli-options
Sep 8, 2026
Merged

fix: reject unknown CLI options before scanning#13
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Gambit-Checkmate:fix/reject-unknown-cli-options

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

What does this PR do?

Unknown CLI flags are currently ignored; for example, --output=report.json can produce a normal scan even though no output file is written. Reject unrecognized long and short options with a message identifying the offending argument and exit code 2, before scanning.

Closes #9.

Checklist

  • Tests pass (npm test: 14 passed)
  • Updated docs / README if behavior changed
  • Added a CHANGELOG.md entry and patch version bump as requested by the contribution guide
  • Followed the existing code style

Notes

Added CLI regression cases for an unknown option with a separate value, an = value, and a short flag. The test failed on the parent code: --output report.json reported a missing path instead of the unknown option. Added checks that both supported value-option forms still produce a clean JSON scan. The complete suite and git diff --check pass (Windows, Node.js).

AI assistance was used to implement this change and run the checks above.

@royalpinto007
royalpinto007 merged commit a8a57ec into AgentPostmortem:main Sep 8, 2026
1 check 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.

Unknown CLI flags are silently swallowed

2 participants