Skip to content

Use cmdlinet::get_comma_separated_values where possible #6996

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

Conversation

tautschnig
Copy link
Collaborator

This is to make sure we accept repeat use of command-line options the
arguments of which are comma-separated values.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@peterschrammel peterschrammel removed their assignment Jul 6, 2022
@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #6996 (e12b764) into develop (917f9a0) will increase coverage by 0.01%.
The diff coverage is 46.66%.

@@             Coverage Diff             @@
##           develop    #6996      +/-   ##
===========================================
+ Coverage    77.83%   77.84%   +0.01%     
===========================================
  Files         1569     1569              
  Lines       180624   180590      -34     
===========================================
- Hits        140583   140582       -1     
+ Misses       40041    40008      -33     
Impacted Files Coverage Δ
jbmc/src/jbmc/jbmc_parse_options.cpp 75.88% <0.00%> (-0.18%) ⬇️
src/goto-harness/goto_harness_parse_options.cpp 78.09% <0.00%> (+9.76%) ⬆️
src/memory-analyzer/analyze_symbol.h 84.21% <ø> (ø)
.../memory-analyzer/memory_analyzer_parse_options.cpp 63.88% <40.00%> (+8.94%) ⬆️
src/cbmc/cbmc_parse_options.cpp 80.15% <100.00%> (+0.04%) ⬆️
.../goto-instrument/goto_instrument_parse_options.cpp 70.93% <100.00%> (+0.03%) ⬆️
src/goto-instrument/unwindset.cpp 85.43% <100.00%> (-0.42%) ⬇️
src/memory-analyzer/analyze_symbol.cpp 74.02% <100.00%> (+1.03%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e104827...e12b764. Read the comment docs.

Copy link

@chris-ryder chris-ryder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me :-) With just one completely optional comment about how the PR/commit is described. With apologies again for the tardiness!

@@ -1,6 +1,6 @@
CORE
main.c
--unwindset main.0:10,f.0:10,g.0:10,g.1:10 --unwinding-assertions
--unwindset main.0:10,f.0:10 --unwindset g.0:10,g.1:10 --unwinding-assertions
Copy link

@chris-ryder chris-ryder Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting here, but more a comment for the PR and/or commit descriptions... But I was having a slightly hard time groking the intent of this PR until I saw this example here in the test case 👍 - So perhaps a clearer description might be something like:

Allow command line options that take values consisting of comma separated list to be
repeated and accumulated into a single list. For instance, making `--foo A,B,C,D` be
semantically equivalent to `--foo A,B --foo C,D`

Or words to that affect... not sure if its clearer or not to other people... but at least having the example in the description would be a big help :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I shamelessly copied this into the commit message!

Ensure that we accept repeat use of command-line options the
arguments of which are comma-separated values. That is, allow command
line options that take values consisting of comma separated lists to be
repeated and accumulated into a single list. For instance, making
`--foo A,B,C,D` be semantically equivalent to `--foo A,B --foo C,D`
@tautschnig tautschnig force-pushed the cleanup/comma-separated-command-lines branch from d1977ca to e12b764 Compare July 6, 2022 15:24
@tautschnig tautschnig assigned tautschnig and unassigned chris-ryder Jul 6, 2022
@tautschnig tautschnig merged commit 09f91ee into diffblue:develop Jul 6, 2022
@tautschnig tautschnig deleted the cleanup/comma-separated-command-lines branch July 6, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants