-
Notifications
You must be signed in to change notification settings - Fork 352
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
add read and write file validators #249 #250
base: main
Are you sure you want to change the base?
Conversation
3ab8954
to
6f88e6c
Compare
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
==========================================
- Coverage 100% 99.96% -0.04%
==========================================
Files 12 12
Lines 2566 2570 +4
==========================================
+ Hits 2566 2569 +3
- Misses 0 1 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #250 +/- ##
======================================
Coverage 100% 100%
======================================
Files 12 12
Lines 3397 2786 -611
======================================
- Hits 3397 2786 -611
Continue to review full report at Codecov.
|
@henryiii if you agree with this approach i will add tests |
CLI::ExistingReadableFile And ...Writable... look like better names I think, but otherwise I like the way you’ve added it! +1 |
Will close #249. |
926fb4f
to
8402e14
Compare
8402e14
to
a0c0e18
Compare
@henryiii the permissions in windows is different then the linux once. that why the test fails. |
What is the plan with this PR? Continue working on it or close it? I can also try to pick up the work |
the issue is with windows since the permissions there is more complicated. |
This would need to be made to work with the changes from #341. For C++17 that enables the use of filesystem so it might be a little easier in C++17 mode on windows now. |
Right, but we would still need to enable file handling (and therefore, this feature) for windows under C++11, correct? Consequently, I would prefer to implement it for Windows & C++11 and not put the test under ifdef. What do you think? |
i will take another look on this and add C++17 support as well |
a0c0e18
to
66a3428
Compare
Signed-off-by: Rafi Wiener <rafiw@mellanox.com> Signed-off-by: Rafi Wiener <rafiwiener@gmail.com>
66a3428
to
bef2388
Compare
@henryiii this and a few other issues about validators indicate that some additional validators are of interest. The balance here is that the Validators can take time to compile so for simple applications that don't use them that is a lot of non useful code that needs to compile that must be balanced with the high utility of the additional Validators for those that use them. What I am wondering if it makes sense to split the Validators into two pieces. The basic definition is required for CLI11, but many of the specific validators and all the machinery that goes with them could be split into a separate file that possibly is even not included in the single file header. Then a separate Validators.hpp would define a library of additional validators, that if someone wanted it they could include that header as well. With the exception of the underlying filesystem operations none of the validators are required by the rest of CLI11. So apart from the basic definition and maybe a couple of the most common validators, the library could be split without issue for 2.0. Then we could get these validators in and some of the other issues without an increasing impact on the compile time. |
Will close #249.