-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verify command line options #650
Merged
fabiangreffrath
merged 26 commits into
fabiangreffrath:master
from
rfomin:check_cmdline
Jul 14, 2022
Merged
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
2a39532
verify command line options
rfomin 11498c9
fix cmake
rfomin beefac0
add -deh -bex to multiple options check
rfomin 2e24294
fix typo
rfomin e2c901e
fix parameter count check
rfomin 67f1f14
add validation for some arguments
rfomin be53c42
fix skill 0
rfomin 25381d5
validate all parameters with argumets
rfomin 077782b
cosmetic fixes
rfomin ed89214
don't check undocumented options if -devparm is set
rfomin 1b13549
fix format error
rfomin 38e0fb7
fix whitespace
rfomin 37896b8
docgen cleanup
rfomin d637a8a
rename GenParams->paramsgen
rfomin 6348fea
fix -turbo check
rfomin 53030ca
more docgen cleanup
rfomin f3705c3
generate help string
rfomin 86affe6
use dictionary
rfomin 9152342
condense help text
rfomin c163642
escape `"`
rfomin 666b1af
remove -gameversion from help string
rfomin 59273d9
set wrap width to 80, few tweaks
rfomin 1b8846f
remove debug line
rfomin 96a1cbe
-setmem error message correction
rfomin cdd7dc1
fix -episode check and -skill description
rfomin 34c5e2f
little cleanup
rfomin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
params.h |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabiangreffrath Should we wrap help text for console output? Maybe we should write shorter help lines instead 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Help text should fit into one console line ideally. Do you have an example of a help text line that doesn't fit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops missed your answer.
This is about a response to the
-help
command. I just generate our CMDLINE documentation, but with selected categories and parameters. So we have a lot of long lines here with multiple sentences: help.txtThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I like this very much! However, 90 chars is too long for a terminal, e.g. MSYS2's mintty defaults to 80x24. To achieve this, I think we shouldn't cut down the help strings. I very much prefer them to be real sentences and actually helpful. Could you tune it so that each line is broken after at most 80 chars?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, 80 columns is the standard, but I have noticed that many modern applications do not respect it.
Anyway, my English is bad, so I'll just let the Python
textwrap
library do its job 😄