Add (weakly required) --all argument to forget-results as well as adding --all-tests argument #18
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.
As mentioned in issue #11, the
forget-results
command's default behaviour of deleting everything will be super dangerous if it ever gains support for deleting individual results. I have now added a--all
option to that command which gives a warning if it is not given but otherwise the command behaves as before (except it now prints status a line on success).In addition a bonus
--all-tests
option is also added that will as the name implies delete results for all the defined tests. So regardless of if the command ever gets support for deleting individual results, it now makes sense to be required to explicitly specify which tests that should be forgotten.I have no plans on working on adding support for deleting individual test results with the forget-results command, but by adding
--all
now this should be less of a problem to do some time in the future.When refactoring and splitting functions I let the code stay in the same place as before as much as possible to make the diffs small, but that might have resulted in a bit untidiness with regards to code layout in the file. Maybe you want to move around on some of the functions.
I have kept the colouring of the warning consistent with the existing code, but I really think it deserves a more prominent colour.