Skip to content
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

Fix issue #248: Align multiline help messages #268

Merged
merged 5 commits into from
Jul 11, 2023

Conversation

fanurs
Copy link
Contributor

@fanurs fanurs commented Apr 22, 2023

This PR fixes #248 by aligning multiline help messages. A previous PR, #259, attempted to fix the issue, but it was not finalized due to unresolved clang-tidy issues. This PR builds upon the work done in PR #259 and addresses the outstanding issues.

The key changes in this PR include:

  1. Using spaces instead of "\t" to separate argument names and help messages. This makes the spacing independent of the terminal's tab width settings and simplifies testing.
  2. Adding a test case to verify that all help messages are properly aligned.

Additionally, while working on this issue, I noticed that the -DCMAKE_CXX_STANDARD=17 flag is required when using CMake to build the test. This flag is currently not documented in the README:

argparse/README.md

Lines 1153 to 1160 in 557948f

# Build the tests
mkdir build
cd build
cmake -DARGPARSE_BUILD_SAMPLES=on -DARGPARSE_BUILD_TESTS=on ..
make
# Run tests
./test/tests

@fanurs fanurs marked this pull request as ready for review April 22, 2023 23:34
@p-ranav p-ranav merged commit b0930ab into p-ranav:master Jul 11, 2023
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.

Correct vertical alignment for multi-line help message
3 participants