Repository navigation
shader_stats: --help exits 0, and an unknown option is refused instead of ignored - #2135
Merged
Merged
Conversation
…d of ignored `-h`/`--help` printed the usage to stderr with exit code 1, and any other `--` option was dropped without a word: `--detail` (a typo for `--details`) printed the summary with exit code 0. Help now goes to stdout with exit code 0, and an unknown option or a wrong argument count is a usage error with exit code 2, as in the other hand-parsed tools. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
Contributor
|
Tested
AI-assisted. No game files. |
Contributor
|
Tested 17 passed. All four help and usage regressions failed on base 4eb6155 and passed here. Inputs came from the test suite. Independent Windows 11 verification, Python 3.15.2. AI-assisted. |
1 of 2 tasks
This was referenced Nov 22, 2026
AAyberkU
added a commit
to AAyberkU/Leonida
that referenced
this pull request
Nov 22, 2026
It was left out of this change while ItsNotRexed#2135 was open on the same file. With the guard added it leaves the test's list of exceptions, which now holds only run_wine_tests.py. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
AAyberkU
added a commit
to AAyberkU/Leonida
that referenced
this pull request
Nov 22, 2026
It was left out of this change while ItsNotRexed#2135 was open on the same file. With the guard added it leaves the test's list of exceptions, which now holds only run_wine_tests.py. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
AAyberkU
added a commit
to AAyberkU/Leonida
that referenced
this pull request
Nov 22, 2026
It was left out of this change while ItsNotRexed#2135 was open on the same file. With the guard added it leaves the test's list of exceptions, which now holds only run_wine_tests.py. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: #2078 (comment) (new BUILD item)
What and why
scripts/shader_stats.pyparses its arguments by hand, and two things went wrong:-hand--helpprinted the usage to stderr and exited with code 1.--option other than--detailswas dropped without a word.shader_stats.py stats.csv disasm --detail(a typo) printed the summary with exit code 0, as if no option had been given.Now help goes to stdout with exit code 0, and an unknown option or a wrong argument count is a usage error with exit code 2 and a one-line usage on stderr. This matches the other hand-parsed tools (
classify_carve.py, and the spirv tools after #1678). Output for valid invocations is unchanged.Tested
Python only: no game files and no GPU involved.
python -I tests/test_shader_stats.py: 17 tests pass (Windows 11, Python 3.12.10). 5 are new; 4 of them fail onmainwithout the fix, the fifth checks that--detailsis still accepted.python -m compileall -q make_game.py tools tests scripts: clean.AI-assisted (Claude Code); I ran the tests above myself on the rebased branch.
Checklist
docs/design.md, with how it was confirmed. (not a translator change)🤖 Generated with Claude Code
https://claude.ai/code/session_016ABh36DZ2sZNq3ChN6EZJs